Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can multiple users access Word file for mailmerge
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00581790
Message ID:
00581993
Views:
15
Doug,
Try to copy the file to their local C drive so that the user will only access the document template to copy it to their machine:

lcfile = "TTSmemo.dot"
lcdir = "c:\temp\lotus"
mypath = lcdir + "\" + lcfile && defines path of output file

IF !Directory(lcdir) && checks to see if the temp directory is on user's hard
MD &lcdir && creates directory if it doesn't exist
ENDIF
IF !FILE(mypath) && checks to see if the file is already on user's hard drive
COPY FILE &lcfile TO &mypath && copies file to directory
ENDIF

oWord = CreateObject("Word.Application") && Create instance of Word Object
oDoc = oWord.Documents.Open("c:\temp\lotus\TTSmemo.dot")

......
perform actions
.......

WITH oWord
.ActiveDocument.SaveAs(lcdir + "\TTSmemo.doc") && Save document
.ActiveDocument.Close && Close document
ENDWITH
oWord.Quit && Quit Word

>> Wes
Previous
Reply
Map
View

Click here to load this message in the networking platform