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

need Outlook 2002 macro to change mail format



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old March 15th 06, 04:34 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default need Outlook 2002 macro to change mail format

You caught me sleeping Michael! Thanks, I forgot about that.

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Michael Bauer" wrote:

Am Tue, 14 Mar 2006 10:56:29 -0800 schrieb Eric Legault [MVP - Outlook]:

While with the CommandBar trick you´ll lose all the formattings, in OL 2002
(and up) you could simply switch the Bodyformat property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Maureen. If you're dealing with these settings at a program level, see

my
post he

Outlook's Message Format Settings In The Registry:
http://blogs.officezealot.com/legaul...8/03/1324.aspx

For a specific message, you will have to automate clicking the choices

under
the Format menu by using CommandBar and CommandBarButton objects from the
Office Object Model. However, you have to switch to Plain Text in

between.
So HTML - Plain Text - Rich Text - Plain Text - HTML. Why do you need

to
do this?


Ads
  #12  
Old March 15th 06, 04:47 PM posted to microsoft.public.outlook.program_vba
Maureen
external usenet poster
 
Posts: 40
Default need Outlook 2002 macro to change mail format

Since the majority of the time we need HTML format and Use Word as Email
Editor, that's the default. When I open a message that I want to forward, I
have no choices available when I click on Format.
--
Maureen


"Eric Legault [MVP - Outlook]" wrote:

Certainly; this option is already there and if you didn't know about it, you
don't need any code.

With an open message, select the format you want from the Format menu. Note
that Rich Text will not be listed if the current format is HTML, and vice
versa. You need to switch to Plain Text when converting between Rich Text
and HTML back and forth.

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Maureen" wrote:

Do you mean that when I open a message, there's a way to change the body
format before clicking on forward? I looked through all the toolbars and
didn't find that choice.
--
Maureen


"Michael Bauer" wrote:

Am Tue, 14 Mar 2006 10:56:29 -0800 schrieb Eric Legault [MVP - Outlook]:

While with the CommandBar trick you´ll lose all the formattings, in OL 2002
(and up) you could simply switch the Bodyformat property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Maureen. If you're dealing with these settings at a program level, see
my
post he

Outlook's Message Format Settings In The Registry:
http://blogs.officezealot.com/legaul...8/03/1324.aspx

For a specific message, you will have to automate clicking the choices
under
the Format menu by using CommandBar and CommandBarButton objects from the
Office Object Model. However, you have to switch to Plain Text in
between.
So HTML - Plain Text - Rich Text - Plain Text - HTML. Why do you need
to
do this?

  #13  
Old March 15th 06, 07:07 PM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default need Outlook 2002 macro to change mail format

Am Wed, 15 Mar 2006 08:34:23 -0800 schrieb Eric Legault [MVP - Outlook]:



You caught me sleeping Michael! Thanks, I forgot about that.


Frankly, I never used that method and had to run a little test... :-)

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
  #14  
Old March 15th 06, 07:14 PM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default need Outlook 2002 macro to change mail format

Am Wed, 15 Mar 2006 06:45:28 -0800 schrieb Maureen:

No, you first need to click on Forward.

This little sample creates the forward mail and switches the format:

Sub test111()
Dim mail As MailItem
Set mail = Application.ActiveInspector.CurrentItem.Forward
If mail.BodyFormat = olFormatHTML Then
mail.BodyFormat = olFormatRichText
Else
mail.BodyFormat = olFormatHTML
End If
End Sub

You could add your own button to the toolbar and run that code by clicking
the button.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Do you mean that when I open a message, there's a way to change the body
format before clicking on forward? I looked through all the toolbars and
didn't find that choice.

  #15  
Old March 15th 06, 07:37 PM posted to microsoft.public.outlook.program_vba
Maureen
external usenet poster
 
Posts: 40
Default need Outlook 2002 macro to change mail format

When I click on Forward that's when it takes FOREVER for the message to open
in Word. I need to change the format before clicking on Forward.

Maybe I can go at it another way. Do you know of a way to have an Outlook
macro open Word and run a Word macro, then close Word and insert a Word
document in the body of a new message? The Word document has form wording at
the top, then clipboard contents are pasted and formatted in a specific font,
then there is form wording at the bottom along with some links to web sites.
The Word macro that creates this document works great, but our network users
don't use Word and want to click on a button in Outlook that starts a new
message and inserts the result of a Word macro in that message.
--
Maureen


"Michael Bauer" wrote:

Am Wed, 15 Mar 2006 06:45:28 -0800 schrieb Maureen:

No, you first need to click on Forward.

This little sample creates the forward mail and switches the format:

Sub test111()
Dim mail As MailItem
Set mail = Application.ActiveInspector.CurrentItem.Forward
If mail.BodyFormat = olFormatHTML Then
mail.BodyFormat = olFormatRichText
Else
mail.BodyFormat = olFormatHTML
End If
End Sub

You could add your own button to the toolbar and run that code by clicking
the button.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Do you mean that when I open a message, there's a way to change the body
format before clicking on forward? I looked through all the toolbars and
didn't find that choice.


  #16  
Old March 16th 06, 04:13 AM posted to microsoft.public.outlook.program_vba
Alan
external usenet poster
 
Posts: 4
Default need Outlook 2002 macro to change mail format


"Maureen" wrote in message
...
Thank you!
--
Maureen



You're welcome - glad it worked for you.

Alan.

--

The views expressed are my own, and not those of my employer or anyone
else associated with me.

My current valid email address is:



This is valid as is. It is not munged, or altered at all.

It will be valid for AT LEAST one month from the date of this post.

If you are trying to contact me after that time,
it MAY still be valid, but may also have been
deactivated due to spam. If so, and you want
to contact me by email, try searching for a
more recent post by me to find my current
email address.

The following is a (probably!) totally unique
and meaningless string of characters that you
can use to find posts by me in a search engine:

ewygchvboocno43vb674b6nq46tvb




  #17  
Old March 17th 06, 06:48 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default need Outlook 2002 macro to change mail format

Am Wed, 15 Mar 2006 11:37:25 -0800 schrieb Maureen:

Maureen, the Word.Application object has a Run function.

You´d need to save the Word Document then as a RTF or HTML file.

If you need it as HTML then simply open the file (e.g. with the
FileSystemObject from the Scripting Runtime Library) read it and insert the
string into the e-mail´s HTMLBody property.

For RTF it´s more work. For inserting that into the e-mail I´d recommend you
the Redemption from www.dimastr.com

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


When I click on Forward that's when it takes FOREVER for the message to

open
in Word. I need to change the format before clicking on Forward.

Maybe I can go at it another way. Do you know of a way to have an Outlook
macro open Word and run a Word macro, then close Word and insert a Word
document in the body of a new message? The Word document has form wording

at
the top, then clipboard contents are pasted and formatted in a specific

font,
then there is form wording at the bottom along with some links to web

sites.
The Word macro that creates this document works great, but our network

users
don't use Word and want to click on a button in Outlook that starts a new
message and inserts the result of a Word macro in that message.

 




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
Macro within a Mail Message Tia Outlook and VBA 1 February 7th 06 02:47 PM
How to determine the format for each e-mail in Outlook 2000? Uncle Bill Outlook - Using Contacts 0 February 1st 06 09:46 PM
Troubles adding a macro to Mail Message - help please [email protected] Outlook and VBA 4 January 26th 06 11:01 PM
Shortcut to change message format Postman Outlook - General Queries 3 January 17th 06 08:56 PM
Choosing OptionsMail Format Crashes Outlook 2003 Baer Bradford Outlook - Installation 2 January 13th 06 05:36 AM


All times are GMT +1. The time now is 07:04 PM.


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.