D
Danny
Hi all,
I am developing a c# console application that takes data from a database and
doing a mail merge in word 2003 to create a contract. I added an event
handler for the MailMergeAfterMerge event:
_WordApp.MailMergeAfterMerge += new
Word.ApplicationEvents4_MailMergeAfterMergeEventHandler(wrdApp_MailMergeAfterMerge);
In the event handler I save the doc and am doing a Console.WriteLine to see
when it is firing so I can debug it:
result.SaveAs(ref _oContractPath, ref _oMissing, ref _oMissing, ref
_oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing);
Console.WriteLine(_oContractPath.ToString() + " Saved.");
The issue I am having is that this event does not fire all the time. It is
really inconsistent. Right now I am testing with 11 contracts. The first
time I run the application one of the contracts does not get saved. The next
time all will be ok. Then the next time I run it 4 contracts did not save.
I don't know why the inconsistency but it is really bugging me. Does anyone
have any ideas why it works only sometimes? Please Help!!
Thank you in advance.
Danny
I am developing a c# console application that takes data from a database and
doing a mail merge in word 2003 to create a contract. I added an event
handler for the MailMergeAfterMerge event:
_WordApp.MailMergeAfterMerge += new
Word.ApplicationEvents4_MailMergeAfterMergeEventHandler(wrdApp_MailMergeAfterMerge);
In the event handler I save the doc and am doing a Console.WriteLine to see
when it is firing so I can debug it:
result.SaveAs(ref _oContractPath, ref _oMissing, ref _oMissing, ref
_oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing, ref _oMissing,
ref _oMissing, ref _oMissing);
Console.WriteLine(_oContractPath.ToString() + " Saved.");
The issue I am having is that this event does not fire all the time. It is
really inconsistent. Right now I am testing with 11 contracts. The first
time I run the application one of the contracts does not get saved. The next
time all will be ok. Then the next time I run it 4 contracts did not save.
I don't know why the inconsistency but it is really bugging me. Does anyone
have any ideas why it works only sometimes? Please Help!!
Thank you in advance.
Danny