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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only