View Single Post
  #3  
Old January 12th 06, 09:21 AM posted to microsoft.public.outlook.program_vba
Marcus O. M. Grabe
external usenet poster
 
Posts: 4
Default Mini macro needed

On Thu, 12 Jan 2006 02:25:01 GMT, Michael Bednarek
wrote:

On Thu, 12 Jan 2006 00:38:34 +0100, Marcus O. M. Grabe wrote in
microsoft.public.outlook.program_vba:

I need a very small macro but don't know how to do it. I did a lot of
VBA in othe Office applications but I do not know the Outlook Objects.

It should just do the following:
- Start
- A mail is th active window or
a single mail is highlighted: Proceed
Otherwise: Abort
- Reply
- in the Reply window:
Change format to text only
- Exit

How can this be done in VBA.


Try this (quick & dirty):

If Not TypeName(ActiveInspector) = "Nothing" Then
ActiveInspector.CommandBars("Standard").Controls(" Reply").Execute
Else
ActiveExplorer.CommandBars("Standard").Controls("R eply").Execute
End If
ActiveInspector.CommandBars("Menu Bar").Controls("Format").Controls("Plain Text").Execute

This will of course present the warning dialogue. There are probably
more elegant and less language-dependent solutions.


Hi Michael,

thank you, works but as you said will still give me the warning
message.
My Outlook-VBA-'Dummy'-Idea was to set DisplayAlerts=False, but this
property doesn't seem to exist in MS Outlook :-(

Marcus
Ads