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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WordPerfect Macro code needed

Status
Not open for further replies.

sdgbh

IS-IT--Management
Oct 30, 2002
3
US
I am looking for the code that will select an open document and place in a variable that can be then used to merge with a specified form. The user steps are as follows:

1. .dat file is opened
2. macro is selected (first step in macro is to pull this open .dat file into a variable)
3. user is presented a dialog box choosing from 4 forms
4. merge is performed with variable and form
5. end of macro

Macro fails because the variable is not recognized as a .dat file.

Any help would be appreciated.
 
Hello sdgbh,
What version of WordPerfect are you using?

Regards,
Michael
 
Macros are normally performed on the current document. If the first step is to open the desired .dat file, why isn't the macro performed on that file by default without the need to place it into a variable? BlackburnKL
 
I'm using version 9

The merge code embedded into the macro needs specific file and location. We have many .dat files and only one form file. My users need to be able to open any .dat file, I've tried "CurrentDoc", "ActiveDoc", macro still stops when the merge is trying to find the variable.

If I specify c:\data.dat then the macro works. But if I open a document, launch the macro with the variable it dosen't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top