Jump to content
Sign in to follow this  
socceraddict

MS Word Form Letter Help Needed

Recommended Posts

socceraddict

I'm looking for a method to populate a form letter with data from stored variables.

Here's a piece of my form letter...

zfirstname zlastname

zstreet

zcity, ID zzipcode

Dear zsal zlastname:

I've tried to use the following code to find and replace, but when I paste the variable into the replace text box, it seems to be including an <ENTER> too. Is there a more efficient way of populating a form letter with variables from my script?

WinActivate("life quote letter_variables.doc - Microsoft Word")

WinWaitActive("life quote letter_variables.doc - Microsoft Word")

send("^h")

WinWaitActive("Find and Replace")

send("zfirstname{tab}")

send($firstname)

Thanks for the help

Edited by socceraddict

Share this post


Link to post
Share on other sites
socceraddict

OK, I figured it out. I just added the following code...

send("{esc}")

send("{tab 2}a")

send("{enter}")

However, is there a more efficient way of populating a form letter?

Share this post


Link to post
Share on other sites
big_daddy

My Word Automation Library should make easy work of this. The link is in my signature and you will also find a help file with examples of its use.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×