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

Macro to change font of selected text in mail message?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 6th 06, 01:00 PM posted to microsoft.public.outlook.program_vba
Joe HM
external usenet poster
 
Posts: 4
Default Macro to change font of selected text in mail message?

Hello -

I have done quite a bit of VB Scripting for Excel and Word but I think
I need some basic information on how to script for Outlook. The
following code will change the font of the currently selected text in a
Word document to Courier New ...
With Selection.Font
.Name = "Courier New"
End With
How would I do that in Outlook? Seems like I need to get a "handle" of
the mail message where the selection is being made.

Any hints?

Thanks!
Joe

Ads
  #2  
Old April 6th 06, 07:06 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Macro to change font of selected text in mail message?

You can't determine the selection in Outlook without using the SafeInspector
object from the Redemption library (http://www.dimastr.com).

Otherwise, you can use the Word Object Model if Word is being used as the
e-mail editor.

--
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/


"Joe HM" wrote:

Hello -

I have done quite a bit of VB Scripting for Excel and Word but I think
I need some basic information on how to script for Outlook. The
following code will change the font of the currently selected text in a
Word document to Courier New ...
With Selection.Font
.Name = "Courier New"
End With
How would I do that in Outlook? Seems like I need to get a "handle" of
the mail message where the selection is being made.

Any hints?

Thanks!
Joe


 




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
need Outlook 2002 macro to change mail format Maureen Outlook and VBA 16 March 17th 06 07:48 AM
shortcut to strikethrough the current selected text in a message Beth MC Outlook and VBA 1 March 3rd 06 09:36 PM
Macro within a Mail Message Tia Outlook and VBA 1 February 7th 06 03:47 PM
my outlook email now comes in big text with normal 12 pt selected chasflies Outlook - Installation 1 January 30th 06 11:01 PM
Troubles adding a macro to Mail Message - help please [email protected] Outlook and VBA 4 January 27th 06 12:01 AM


All times are GMT +1. The time now is 08:17 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.