Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word mail merge headaches
Message
De
14/07/2005 09:44:10
 
 
À
13/07/2005 16:14:29
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01032386
Message ID:
01032608
Vues:
23
Hi Darrell,

this won't solve your problem, but I had too many problems with datasources when trying to automate Word's mail merge, so I went with setting up a template with bookmarks and looping through my data replacing the bookmarks and that avoided all my problems.

I have some code lying around that I could find to show you if you need it.


>The code works fine on my system running windows xp pro and office 2003. tech support staff tells me that on their system (windows xp home and office 2003) when our application is run on the network drive that when word opens it brings up a message about not being able to find the datasource (lcExcelfile) and has the name and path of the excel file correct and when they click on the "Find Datasource..." button the file is in the correct location and they select it and everything is fine. apparently one of our customers has noticed this behavior as well. If they copy our app locally and run it the issue goes away. The code below is how I attach the datasource and then I save shortly after this code. The word document exists, the excel spreadsheet exists, and obviously knows it's supposed to be attached but word seems confused. any ideas?
>
>
>
>lcExcelFile="c:\somefile.xls"
>
>lcConnect=[Provider=MSDASQL; ] + ;
>[Driver={Microsoft Excel Driver (*.xls)}; DBQ=] + ;
>lcExcelFile
>
>
>oDocument.MailMerge.OpenDataSource( lcExcelFile, 0,
>.F.,,.T.,,,,,,lcConnect,[Select * from `Sheet1$`],"","",.f.,8)
>
>
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform