>>Hi,
>>
>>I would like to build a mailmerge with a Word document. Have tried to make use of the mailmrge.vcx in solutions and faced an error to which I dont have an answer:
>> In preparedate method: "Cannot open data table for share use."
>>
>> I am using a cursor to fill the aflds.
>>Anybody to show me how to solve this?
>>
>>Regards,
>>
>>Koen
>
>This works up to Office 2010 64 bits:
>
>
http://www.tek-tips.com/viewthread.cfm?qid=1581222&page=3>
>Cetin
Hi,
I have a local cursor and work with an already prepared Word document.
The fieldnames of my cursor tally with the field names in my Word (template) document.
I am able to make a mailmerge by 'hand' by means of a) export my local cursor to an Exel file and than b) mailmerge myu WordDocument and the Excel sheet with the Word mailmerge module. I would like to automate that process in my VFP application.
When I use your Procedure, I get an wait windo "Preparing Word document.Please wait..." Nothing apearently happens, I cant cancel - remains Ctrl-Alt-Delteand , I kill VFP and are confronted with a window of Word - prompting me to to give the field delimeters no use to give a delimeter as VFP already killed.
Obviously I am either doing something wrong with passing the paramaters to your procedure or doing something wrong with preparing the Word (Template) document.
Some assistance would be nice.
VFP9Sp2 - Word2007.doc XP or VFP9Sp2 Win7 Word2010.doc no difference same situation.
Regards,
Koen