View Single Post
  #7  
Old July 18th 09, 10:13 AM posted to microsoft.public.outlook.program_vba
Mats Samson
external usenet poster
 
Posts: 12
Default Switch Mail format

Thank you Ken,
your last proposal was in fact the simplest solution, I had overlooked
the toolbar option to switch between different formats AFTER starting
a new mail. I thought it had to be done prior pushing the New button.
Thanks anyway for assistance!
Mats

"Ken Slovak - [MVP - Outlook]" wrote:

My error there in the instructions, the WithEvents declarations and event
handlers should be in a class (which could be ThisOutlookSession), and yes
the Activate() event should be as you mention for an event signature.

If you want this to run on demand the macro can be much simpler and would be
in either a code module or ThisOutlookSession:

Sub ChangeFormat()
Application.ActiveInspector.CurrentItem.BodyFormat = olFormatPlain
End Sub

However, you can just use the format changing menu commands in that case and
not bother with a macro.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mats Samson" wrote in message
news
Ken,
I find the code confusing!
The WithEvents doesn't fit in to a Module, they seem to fit into a
ThisOutlookSession!?! If I run it from there I get compile error in the
"Sub
colInsp_NewInspector(Inspector As Inspector), not matching description or
having the same name.
Furthermore the Sub oInsp.Activate() must be oInsp_Activate, right?

The best solution would be if I can attach the code to a toolbar button so
when I want to send a fax, I press the button and I get a new plain text
message.
Regards
Mats



Ads