A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Mini macro needed



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 06, 12:38 AM posted to microsoft.public.outlook.program_vba
Marcus O. M. Grabe
external usenet poster
 
Posts: 4
Default Mini macro needed

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
Ads
  #2  
Old January 12th 06, 03:25 AM posted to microsoft.public.outlook.program_vba
Michael Bednarek
external usenet poster
 
Posts: 15
Default Mini macro needed

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.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
  #3  
Old January 12th 06, 10: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
  #4  
Old January 13th 06, 07:21 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Mini macro needed

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.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



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

  #5  
Old January 13th 06, 02:52 PM posted to microsoft.public.outlook.program_vba
Marcus O. M. Grabe
external usenet poster
 
Posts: 4
Default Mini macro needed

On Fri, 13 Jan 2006 07:21:19 +0100, Michael Bauer wrote:

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
  #6  
Old January 16th 06, 09:06 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Mini macro needed

Am Fri, 13 Jan 2006 14:52:31 +0100 schrieb Marcus O. M. Grabe:

Marcus, please read here Dmitry´s comment:
http://groups.google.de/group/micros...f0528c7b4937fd


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



On Fri, 13 Jan 2006 07:21:19 +0100, Michael Bauer wrote:

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Macro Sanjeev kumar Kodavalla Outlook - Using Forms 2 March 5th 06 08:24 PM
Outlook should have a mini-mode, like Media Player's mini-mode. glen Outlook - General Queries 1 February 27th 06 07:16 PM
Running a macro SuperSlueth Outlook - Using Forms 15 February 7th 06 10:51 PM
Distributing a Macro sweens319 Outlook and VBA 2 January 10th 06 07:48 PM
VB and outlook macro need help jbullington Outlook and VBA 1 January 10th 06 04:22 PM


All times are GMT +1. The time now is 11:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.