D
dixie
I have an Access 2000 application that needs to use automation to open a
merge letter in Word based on a .dot file and end up with a standard
document file (Document1 usually) that has the merged data in it.
The code has worked fine UNTIL one of the sites using the program changed
over to Office 2003. Apart from other problems with being asked for a
digital signature for macros(?) when it opens, the main difference is that
when you press the button to run the procedure to automate with Word (2003
now). What seems to happen is that the *.dot merge file opens and I get a
message stating something along the lines of The file is not a mailmerge
main document. That isn't the actual wording, I am only going from someone
elses description right now as I don't personally have Office 2003 (nor do I
have any early plans of buying it.)
I am in a quandry here as I have to fix this and I do not know why it is
happening. Is there anyone out there who can put me onto the right track or
has also experienced this problem.
What I need to do is to "spawn" a document in Word from a .dot template
which is a mailmerge document. It works in 2000, 2002, but now is not
functional in 2003
The code I am using within my Access program for the automation procedure is
basically as folllows:
'Check to see if the file is already being used
fIsDocFileOpen "f:\letter.dot"
'create an instance of word
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add "f:\letter.dot
'perform mailmerge
wrdDoc.MailMerge.Execute
wrdDoc.ActiveWindow.WindowState = wdWindowStateMaximize
'close the original form document
wrdDoc.Close wdDoNotSaveChanges
'release references
Set wrdDoc = Nothing
Set wrdApp = Nothing
merge letter in Word based on a .dot file and end up with a standard
document file (Document1 usually) that has the merged data in it.
The code has worked fine UNTIL one of the sites using the program changed
over to Office 2003. Apart from other problems with being asked for a
digital signature for macros(?) when it opens, the main difference is that
when you press the button to run the procedure to automate with Word (2003
now). What seems to happen is that the *.dot merge file opens and I get a
message stating something along the lines of The file is not a mailmerge
main document. That isn't the actual wording, I am only going from someone
elses description right now as I don't personally have Office 2003 (nor do I
have any early plans of buying it.)
I am in a quandry here as I have to fix this and I do not know why it is
happening. Is there anyone out there who can put me onto the right track or
has also experienced this problem.
What I need to do is to "spawn" a document in Word from a .dot template
which is a mailmerge document. It works in 2000, 2002, but now is not
functional in 2003
The code I am using within my Access program for the automation procedure is
basically as folllows:
'Check to see if the file is already being used
fIsDocFileOpen "f:\letter.dot"
'create an instance of word
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add "f:\letter.dot
'perform mailmerge
wrdDoc.MailMerge.Execute
wrdDoc.ActiveWindow.WindowState = wdWindowStateMaximize
'close the original form document
wrdDoc.Close wdDoNotSaveChanges
'release references
Set wrdDoc = Nothing
Set wrdApp = Nothing