Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can multiple users access Word file for mailmerge
Message
De
15/11/2001 08:48:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00581790
Message ID:
00581993
Vues:
16
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform