Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Semi-automating Mail Merge to Word

Status
Not open for further replies.

ShaunaH

Programmer
Jun 4, 2002
3
US
Hello,

Has anyone tried setting up their Paradox app to help with mail merge to Word? Specifically, I'm thinking of a process like this:

1. Help the user choose from a list of Word templates
2. Help the user derive the data (using something like combo boxes to get input for a query), then execute the query
3. Export the query result table -- so far exporting as an Excel spreadsheet works best for me, but it has its drawbacks. I'd like to export as some sort of table readable by Word such as dBASE III+
4. Start Word in MailMerge mode from the pdx session -- How?
5. In the started Word session, create a new document which is a copy of the selected template, link to the exported data source, and display the document so that the user can make changes if desired before running the merge

Can anyone help with any or all of this?

Thanks,
Shauna
 
Sounds like you have most of it figured out. Paradox will export to DBase. To start Word and go to Mail Merge use the execute() and sendKeys() commands respectively.

Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Thanks, Mac (or Langley).

You've gotten me started. I've gotten the execute() command to open Word and wait for input. But since I'll be opening files in other directories and giving other somewhat complex commands that are not just menu choices, I'd like to send commands rather than elaborate sendKeys sequences. Do I just use Office automation commands? Do you have a simple example of one sent from Paradox?

Thanks again,
Shauna
 
I think what some others have done is to define Macros in Word, then use sendKeys() to activate the Macros, or activate them from the commandline using execute(). You could also look at the OLEAuto() commands. I've never used them, but it looks like they could work for what you want to do... providing Word is cooperative.





Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top