Monday, February 25, 2013 8:57 PM
when I right mouse on an outlook mailitem it has an action called "OneNote" that allows the emails to be sent nicely formatted to OneNote. I am trying to mimic that functionality in VBA code. goal is to read all the mail items in an Outlook folder and send them to Onenote.
mailitem.actions does not have most of the options shown when I right mouse on a mail item in outlook.
has anyone done this?
Tuesday, February 26, 2013 11:19 AMModerator
Thank you for posting in the MSDN Forum.
I am trying to mimic that functionality in VBA code.
in your thread.
It based on my experience that the request is impossible to realize.
Hope it helps.
Quist Zhang [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Tuesday, February 26, 2013 1:00 PMyou could always try to invoke ribbon command for this action and let outlook do all heavy work (using CommandBars.ExecuteMso function)
- Marked As Answer by Quist ZhangMicrosoft Contingent Staff, Moderator Thursday, March 07, 2013 1:24 PM
Tuesday, February 26, 2013 6:40 PMthats depressing. But I am beginning to see where that is true since I have spent a couple of days wrestling with this
Tuesday, February 26, 2013 9:26 PMModerator
Do you want to send to OneNote or what? What end result would you want?
If you execute a ribbon button using CommandBars.Execute() syntax the end result would be the default action of the button. You cannot override the default action unless you use a COM addin and handle the ribbon onAction callback for the button or repurpose the button.
You might be able to use Word formatting functions as a subset of the full Word is used as the Outlook email editor. If the item is open as ActiveInspector, the Word.Document object for the email body is ActiveInspector.WordEditor.
You can get that Document object and do whatever formatting the Word email subset of functions allow.
Ken Slovak MVP - Outlook
- Marked As Answer by Quist ZhangMicrosoft Contingent Staff, Moderator Thursday, March 07, 2013 1:23 PM