Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Mailmerge Woes
Message
From
08/12/2006 21:32:53
 
 
To
07/12/2006 10:20:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175633
Message ID:
01176323
Views:
8
As I said in a previous note, I've changed to text files and it works very well. On thinking more about this though, it occurs to me that memo fields don't export to text files. I thought about using XML, but I was surprised to find that Word won't accept XML for mail merge. Or did I miss something? Do you know if there is a way to use XML files in a word mailmerge?

>>This is driving me crazy. In trying to mailmerge in MS Word using a VFP free table, the code uses the Word VBA method "oWord.ActiveDocument.MailMerge.OpenDataSource()". That method takes up to 15 parameters, only the first of which is not optional. The 13th parameter is an SQL statement - in this case a simple 'select * from ...'.
>>
>>I've run into a really oddball situation. My colleague and I are both running Win2K SP4 with Word 2002 SP3 (our office standard right now). We are both able to manually mailmerge in Word using the VFP table, so the ODBC appears to be properly installed in both our cases.
>>
>>BUT... if I include the 13th parameter in my code (the Sql statement) Word refuses to recognise that the table contains any fields when run on his system. In other words it fails. On my system, it runs like a champ.
>>
>>If I remove that 13th parameter, then on my system it fails and on his system it works beautifully.
>>
>>We've run into the same sort of situation with some of our clients, and I feel like I'm beating my head against the wall. I have no idea what is different about his and my systems that might cause such strange behaviour.
>>
>>I can't find any sort of setting in Word that looks like something that might affect this, and our odbc setups appear to be exactly the same.
>>
>>The only real difference is that I have full VFP on my system and he has only the runtimes (same version though (9 SP1). Of course, our clients all only have the runtimes, so I don't think that's going to have anything to do with it.
>>
>>Does anyone have any suggestions about where I might look, or what might be causing this?
>
>Alan,
>IMHO do not use OpenDataSource() with VFP. Simply use a txt file instead. You can search on details 'why not' and sample code here.
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform