
Announcements
How I can export from Outlook specific keywords to Microsoft Word document template? For example in email body I have First Name: John Last Name: Smith. I would like to export John and Smith to fields First Name and Last Name in Word Templ document?
Hi @mnamiz05
You can get the first name and last name easily from the email body.
Read the email body content using the inbuilt action and then using string functions like Get subtext, retrieve the first and last names.
For writing this to a word document there are multiple options depending on your scenario.
1. Find and Replace dialog box of Word using sendkeys
You can keep a placeholder in the Word Template something like #FirstName#
and then replace this with the variable value read from the email.
{Control}({H}) is the shortcut key
Solved: MS Word in PAD - Power Platform Community (microsoft.com)
2. Using the Find and Replace functionality via macro
Refer the code I have added in this post.
Solved: Replace a text directly in a word doc - Power Platform Community (microsoft.com)
Same can be done via Powershell or a vbscript.
3. Use UI elements to Interact with the document
This post will help you achieve that
Solved: Transfer data from Word to Excel using PAD - Power Platform Community (microsoft.com)