error #1429 in mailmerfeword8

N

neia

I created an application using Visual Fox Pro 6.0 that has an option to
mailmerge
data for word 2003. When pressuring button that executes this mailmerge I
receive the following message: "Error #1429 in mailmergeword8 (63) ole
Idispatch exception code 0 from Microsoft word".
What does it mean? What can I do to eliminate this problem?
Bellow, I show part of the program´s code in order to give more information:

WITH THISFORM.mailmerge1
..cAppTitle = "Sistema X"
..nWordProc = 1
..nNewDoc = 2
..cdocname = docx
..nTemplate = 1
..cAlias = ALIAS()
..cDBCTable = DBF()
..cDBCName = DBC()
ACOPY(aflds, .aAutoFields)
..MakeOutput()
ENDWITH

DO Executa_ApiShell32.prg WITH "Open", docx
 
P

Peter Jamieson

Unfortunately I don't know VFP well enough to know what might be wrong with
the VFP part of your system but,
a. Which version of Word? Is it Word 97? If it is a later version, you may
need to take account of the following article:

http://support.microsoft.com/kb/825765

b. Can you open your Mail Merge Main Document in Word, manually, and run
the merge successfully?
c. how do you actually execute the merge? Does your document have an
AutoOpen macro, or do you control Word from VFP using OLE Automation?

Peter Jamieson
 
N

neia

a. My word is 2003. Afterwards I will read the article you listed.
b. Yes.
c. I control word from vfp using ole automation.
thanks

"Peter Jamieson" escreveu:
 
N

neia

Peter
I read the article and I modified the windows register.
Although the mailmerge was succesfully, because I saw the results, I
continue receiving the message error.
Do you have any idea?

"Peter Jamieson" escreveu:
 
N

neia

I haven´t created a code in Word.
I only use the code I post bellow in VFP.
This problem appears since I began using XP with office 2003.
Initialy, when I created this program, I didn´t have problems.


"Peter Jamieson" escreveu:
 
P

Peter Jamieson

I think this error is raised when the template that the document is attached
to cannot be found.

Perhaps you have upgraded the documents to Word 2003 but not the templates,
or something like that.

Peter Jamieson
 
N

neia

I looked informations about this and I discoverd the article bellow on
www.code-magazine.com/article.aspx?quickid=0301072&page=3:
"Visual FoxPro has a number os functions to retrieve error information,
such as Message(). However, those functions are not really adequate to make
this bullet-proof, since nested erros make things a bit complicated...."
I use VPF 6.0. so, I coudn´t apply the code suggested because it refers to
8.0 version of VFP, but I solved my problem asking about this error into a
mailmerge class.
Thanks for your help.

"Peter Jamieson" escreveu:
 
Top