![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |