Rita
2006-06-16 13:56:01 UTC
Hi
I created a add-in. I should be creating a header on the save of the
document. I binded the save event in the onConnection().Event binded is:
oWord.DocumentBeforeSave += new
Word.ApplicationEvents4_DocumentBeforeSaveEventHandler(oWord_DocumentBeforeSave)
At present i'm creating a header in the oWord_DocumentBeforeSave(). Problem
here is when user clicks on save, save dialog box is prompted. If user clicks
on cancel in the save dialog box even then header is created. I need to
create header only when he saves the document. The code which i have used in
oWord_DocumentBeforeSave() is as follows:
private void oWord_DocumentBeforeSave(Word.Document doc, ref bool SaveAsUI,
ref bool Cancel)
{
SetWordHeaderFooter();
}
Is there any way i can handle Cancel button click event when user clicks on
Cancel in Save dialog box. Any helpon this is highlt appreaciated.
Thanks in Advance
I created a add-in. I should be creating a header on the save of the
document. I binded the save event in the onConnection().Event binded is:
oWord.DocumentBeforeSave += new
Word.ApplicationEvents4_DocumentBeforeSaveEventHandler(oWord_DocumentBeforeSave)
At present i'm creating a header in the oWord_DocumentBeforeSave(). Problem
here is when user clicks on save, save dialog box is prompted. If user clicks
on cancel in the save dialog box even then header is created. I need to
create header only when he saves the document. The code which i have used in
oWord_DocumentBeforeSave() is as follows:
private void oWord_DocumentBeforeSave(Word.Document doc, ref bool SaveAsUI,
ref bool Cancel)
{
SetWordHeaderFooter();
}
Is there any way i can handle Cancel button click event when user clicks on
Cancel in Save dialog box. Any helpon this is highlt appreaciated.
Thanks in Advance