View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Mina Din Mina Din is offline
external usenet poster
 
Posts: 1
Default MailMerge with Office XP and FoxPro

I have a very old program which is using FoxPro 6.0. There is a function in
the program to perform a mailmerge function and it works fine until my PC was
upgraded to Office XP. This is the coding of my program :

LOCAL lcWord

lcWord = CREATEOBJ( "Word.application" )
lcRenewalLetter = "c:\temp\life.doc"

lcWord.documents.OPEN( lcRenewalletter )
lcWord.activedocument.MailMerge.execute
RELEASE lcWord

I found the program was failed at the MailMerge.execute statement. The error
message is OLE IDispatch exception code 0 from Miscrosoft Word.

Can anyone help me.