Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Launch Word with Macro
Message
General information
Forum:
Microsoft Office
Category:
Word
Miscellaneous
Thread ID:
00001500
Message ID:
00001515
Views:
49
>I've had luck with a simple launch of WordPerfect
>with a 'launch macro' (using the old !/n
>mechanism). I want to perform the same function
>with Word, but can't figure out if its possible to
>launch Word with an 'auto-macro'?
>
>Is this doable, or should I be barking up another
>tree?
>
>FYI, I'm just handing off a series of databases
>created on the fly, creating formatted DOCS for
>each item in a list.
>
>Thanks in advance.
>
Bill:

With a bit of reference to WordBasic help, this code should get you started.

*-- MergWord.prg - Function to merge current record with Word doc
*-- Doc (MergDoc) must exist, and have correct fields for Alias()

FUNCTION MergWord && to merge a single letter w/Word

PARAMETERS WordDoc && Word .doc FileSpec with path

PRIVATE WordDoc,NoClientErr,IChannel,TimeOutErr

NoClientErr =13 && USed to compare with DDELastError() return
IChannel =-1 && -1 if starting, 0 if DDEInitiate() fails
TimeOutErr =9

*-- Make way for new m
Ten years software development
Specializing in FoxPro applications
Glendale, CA
See my web page for references: www.datadepot.com/~parsons
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform