"Do you want to save the changes?" after we have added our signature

Add-in Express™ Support Service
That's what is more important than anything else

Only registered users are allowed to subscribe.
"Do you want to save the changes?" after we have added our signature
 
Subscribe
N.Meyer




Posts: 18
Joined: 2012-11-07
Hello,

a new email will be marked as changed after applying our signature. So there is always the “Do you want to save the changes” dialog when you close the window.
This does not happen when using the Outlook signatures.

When inserting the signature, we add the bookmark "_MailAutoSig" with our text, when a new e-mail is created.

Is it possible to set the email as not changed?

Thanks in advance.

Best regards
Nedeljka Meyer
Posted 16 Oct, 2017 01:15:04 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Nedeljka,

You can try to save the mail item after adding your custom signature text.
Posted 16 Oct, 2017 04:53:02 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
The problem is that the email is then saved in "drafts"-folder.
Posted 16 Oct, 2017 07:21:55 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Nedeljka,

Try to get the Word._Document object from the Inspector.WordEditor property. Then set the Saved property of Word._Document to true.
Posted 16 Oct, 2017 09:27:37 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
Hi Dmitry,

the dialog "Do you want to save the changes" still comes when you close the window.
The MailItem.saved-property has not changed, if after MailItem.WordEditor.Saved-Property set to True.
Posted 16 Oct, 2017 22:26:51 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Nedeljka,

This works for us in Outlook 2016. What Outlook version are you using?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Oct, 2017 04:51:06 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
Hello Andrei,

I am using Outlook 2010.

Is there a "Do you want to save the changes" dialog when you close the window?
Posted 18 Oct, 2017 00:53:36 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Nedeljka,

My add-in has this code line only:

procedure TAddInModule.adxRibbonTab1Controls0Controls0Click(
  Sender: TObject; const RibbonControl: IRibbonControl);
begin
  OleVariant(OutlookApp.ActiveInspector.WordEditor).Saved := true;
end;


It works correctly in Outlook 2010 and 2016. I create an email and enter some text. When I try to close the inspector window, Outlook shows the "Do you want to save the changes" dialog; this is expected. I choose Cancel, click my Ribbon button and close the inspector window; Outlook doesn't show the dialog this time.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Oct, 2017 05:57:13 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
Hello Andrei,

Your solution has worked.
We had a property of MailItem changed and therefore it came to the dialogue.

Thanks a lot.

Regards
Posted 19 Oct, 2017 22:32:25 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Oct, 2017 04:04:34 Top