Mini macro needed

  • Thread starter Thread starter Marcus O. M. Grabe
  • Start date Start date
M

Marcus O. M. Grabe

HI all,

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.

THX Marcus
 
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("Reply").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.
 
Try this (quick & dirty):

If Not TypeName(ActiveInspector) = "Nothing" Then
ActiveInspector.CommandBars("Standard").Controls("Reply").Execute
Else
ActiveExplorer.CommandBars("Standard").Controls("Reply").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
 
Am Thu, 12 Jan 2006 10:21:13 +0100 schrieb Marcus O. M. Grabe:

Marcus, in OL >= XP you can set the MailItem´s BodyFormat property.
 
Am Thu, 12 Jan 2006 10:21:13 +0100 schrieb Marcus O. M. Grabe:

Marcus, in OL >= XP you can set the MailItem´s BodyFormat property.

Thank you for your answer, but since I'am still on OL2000 it does not
help very much.

Actually that was exactely what I was looking for but couldn't find.
At least your answer shows me that I am not that dummy looser ;-) It's
just not there.

However.... Can you maybe recall on something from your very first
childhood when OL2000 was still a topic:

Has there been a way to avoid forced user intervention?

Kind regards to wherever you are (and have a nice weekend, if you have
weekends wherever you are ;-) )...
.... Marcus
 
Back
Top