I am currently re-developing an old process which sends out emails regarding payment defaults. I am attempting to add line breaks to format the email with “\n”, vbCrLf, “[k(enter)]” and Environment.NewLine. None of these work with Set Text or SimulateType/SendWindowMessagesType Into, and will either type \n in the email body or type a space, instead of a new line. Standard Type Into takes too long.
I copied the same activities over and it seems to work on a VM, but not on my current machine which is where it needs to run from. I have already made a post on the same issue but it is closed and I have already tried everything suggested with no fix.
Does anybody have any other solutions I can try? Any help is appriciated.
Thanks in advance.
Edit: I am typing into a web email with no HMTL options
I have tried this also, forgot to mention it. It will not work when SimulateType is checked. I cannot use HTML in the web email, and cannot send the emails through send email.
The body takes around 1min 30sec to type per email without SimulateType, and there are around 90 emails to send in one run, which will take far too long. I will give vbNewLine a go, but I think it will have the same results as vbCrLf.
I tried vbNewLine, it works fine in the message box before the Set Text and adds Line Breaks, but changes the Line Breaks to spaces when the data is entered with Set Text. This is the same as vbCrLf. See screenshot (apologies for the poor scribbling, email contains sensitive information):
I ran the old code again, and it worked. Set the new code up exactly the same and it doesn’t work. The packages are not the same versions, as the old code was made 12 months ago. Could this be the reason why the new version isn’t working?