Hi All:
I need to be able to open MS word document and merge my data source to this document without message poping up asking the user click ok to open the document as read only. Since this process needs to run at night, it creates a problem since there is not one there to click ok.
Please find my code below:
LOCAL LetterName
LetterName = "H:\charisma\MEET152\Letters\Meet152R+H_CONFO_Template.Doc"
lcspreadsheet = "E:\Temp\Excel\Test2.xls"
oWord=CREATEOBJECT("Word.Application")
oWord.WordBasic.AppMinimize(1)
oWord.VISIBLE=.T.
oWord.Documents.OPEN(LetterName)
oWord.WordBasic.MailMergeOpenDataSource(lcspreadsheet,0,0,1,0,"","",0,"","", ;
"Entire Spreadsheet", "","") *// I am having problem here merging doc.
Any idea is greatly appricated.
Thanks
MA
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement