Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mail Merge of Word 2003
Message
De
16/04/2004 07:36:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/04/2004 15:31:06
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00895297
Message ID:
00895481
Vues:
20
>Hi Everyone,
>
>We have a code in mail merge which runs successfully on version lower than Office 2003.
>
>If we use Office 2003, it has a problem.
>
>It will give an error message
>“Error Message: OLE IDispatch exception code 0 from Microsoft Word: Requested object is not available...”
>
>Below is our Visual Foxpro 8.0 code.
>====================================
>
>
>lcFileName = getfile("doc")
>
>PUBLIC goWordApp, goWordDoc
>goWordApp = createobject("Word.Application")
>goWordApp.Visible = .t.
>goWordApp.WindowState = 0
>goWordDoc = goWordApp.Documents.Open(lcFileName)
>
>with goWordDoc.MailMerge
> .Destination = 1
> .Execute
>endwith
>
>goWordDoc.Close(.f.)
>goWordApp.Quit(.f.)
>
>release goWordDoc, goWordApp
>
>
>
>
>
>
>
>Looks to me that there are changes on Word 2003 object implementation.
>The code that has the problem is in “.Destination = 1”
>
>Anybody know what changes shall we do so that we can run it on Word 2003?
>Also, what code shall we put so that it can support lower Office version #?

Shooting in dark w/o w2003. Destination = 1 is for printing, right ? Following that you seem to be releasing the word before it does the printing.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform