Mail line breaks in fixed phrases malfunction


I wanna to automate the task of typing fixed text in Outlook and sending it to a specific destination.
Therefore, I used read text file activity.
But Robot recognizes Enter key for automated line break of fixed phrase.
So, the mail is sent befoer all the fixed phrase are typed.

I would like to use line breaks in fixed phrase as possible. To make the body of mail easier.

I ask you for a solution.

Belowed fixed phrase.


This is a Test mail of RPA.

Today is {0} .
I send {1} to you as add fiel.

Thank you.

updated Main - コピー.xaml (19.0 KB)

How about marking SimulateType checkbox property of TypeInto as checked.

Thank you for your reply.
I tried it, but nothing was typed.

How about assign a variable =String.Format(template, Now, " テストファイル ") then pass that variable in TypInto and try above method (make sure variable returning the value(put a message box to see) and its focused on mail body)

I added variable as you say.
But I can not type the text, and I move on to the next process.

I added Write line activity before type activity, but it is normally output to the Output panel.

oh that’s bit weird behavior :wink: .
Lets check the problem with TypeInto or Target element.

Do the following checks and let me know:

  • Open any notepad and in TypeInto indicate on notepad screen .(to check whether its writing in target element or not)

if no success then

  • Try using Set Text activity instead of TypeInto activity.

Maybe because I am operating in a secure environment.

I was able to type into Notepad, but I can not do it with the body of Outlook.
I also used set text activity, but fixed phrase is not reflected in the body of Outlook.

Very regrettable.

Didn’t quite get :thinking:
oh…:frowning: But if you can do manually means you could do via studio too. How about this:
Ok try this.
Rather than reading from text file because your unable to do fixed phrase directly into typeinto:

  • Just pass some string and check whether it’s able to type into mail body?

  • If yes then you could pass below string as :

  • “Today Is {0} .”+Environment.NewLine+“I send {1} To you As add fiel.”

I tried to apply your advice immediatelty.
But Environment.NewLine is recognized as Enter key in Outlook, only “Today is {0}” is input and sent.
When checking Simulate Type, processing is progressed without input at all.

Uncheck Simulate Type and pass this in TypeInto.
“everyone”+“[k(enter)]”+“This is a Test mail of RPA.”+ “[k(enter)]”+“Today is {0} .”+ “[k(enter)]”+“I send {1} to you as add fiel.”+ “[k(enter)]”+“Thank you.”

PS:Should be in single line.

Thank you for your advice!
I was able to type all sentences into the body of Outlook somehow.
I am sorry tha the versatility has been lowerd, but I’m very grateful to you for making efforts to solve.


1 Like