Copy data from word to email


#1

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?


#2

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

Regards,
SP


#3

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


#4

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


#5

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 {}.


#6

@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…


#7

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)


#8

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