Copy data from word to email

Capture213
I copied this email template into a word doc and i have read the data of that doc. and write it in the body of an email,but i am not getting the exact table format,instead it just copies the data in a paragraph format.So can i copy the exact template from word to email body?

Hi @im_heathen ,
Can you try sending a mail via mail merge in word

Regards,
SP

Refer this Html template, if it helps
HtmlEmailBody.zip (2.9 KB)

1 Like

@Bharat Yeah,it was really helpful.But how can i change those values accordingly for different users??

In string.format(), you can change accordingly for different users, can also add\remove format items as per your needs in the text file with the help of {}.

1 Like

@Bharat Yeah,i understand,but what i am asking is,can i pass variables inside the format() or the text document which holds different values at different runs??If that’s possible,please do tell me…

Yeah it takes Object type as arguments, just change those fixed strings inside String.format() with your variables such as
String.format(htmlText,Name,RequestId,Summary,Priority,Status,RootCause,Resolution)

1 Like

Yeah,just need to put those values in those variables and pass it here,right?