K
KZeeh
I have a Visual FoxPro app with a mailmerge in it, working fine for several
years under Win2000 and Office 2000. A few people got upgraded to XP and
Office 2002 or 2003. Now the mailmerge does not work for only them. Here is
the code that works on the Win2000/Office2000 machines and not on the
upgraded ones.
**********************************************************
use c:\kelly\wordtest\tmpdec in 0 && datasource
select tmpdec
oWord = CREATEOBJECT('Word.Application')
oWord.WindowState = 2 && wdWindowStateMinimize
oDoc = oWord.Documents.Open("c:\kelly\wordtest\decision.doc")
oDoc.MailMerge.Destination = 0 && wdSendToNewDocument
oDoc.MailMerge.Execute
oWord.Documents(1).Activate
oWord.WindowState = 1 && wdWindowStateMaximize
oDoc.Close
**********************************************************
The error on these machines is "This method or property is not available b/c
the current mail merge main document needs a data source..." This crashes on
the Mailmerge.execute line. But there is a datasource, populated with data
and it works fine on the old machines.
Any insight????? Thank you so much for any ideas at all -I am tearing my
hair out here...
years under Win2000 and Office 2000. A few people got upgraded to XP and
Office 2002 or 2003. Now the mailmerge does not work for only them. Here is
the code that works on the Win2000/Office2000 machines and not on the
upgraded ones.
**********************************************************
use c:\kelly\wordtest\tmpdec in 0 && datasource
select tmpdec
oWord = CREATEOBJECT('Word.Application')
oWord.WindowState = 2 && wdWindowStateMinimize
oDoc = oWord.Documents.Open("c:\kelly\wordtest\decision.doc")
oDoc.MailMerge.Destination = 0 && wdSendToNewDocument
oDoc.MailMerge.Execute
oWord.Documents(1).Activate
oWord.WindowState = 1 && wdWindowStateMaximize
oDoc.Close
**********************************************************
The error on these machines is "This method or property is not available b/c
the current mail merge main document needs a data source..." This crashes on
the Mailmerge.execute line. But there is a datasource, populated with data
and it works fine on the old machines.
Any insight????? Thank you so much for any ideas at all -I am tearing my
hair out here...