Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Smile from Wingding font

Status
Not open for further replies.

cwjr

IS-IT--Management
Apr 30, 2002
88
US
I have a user that wants a button on the toolbar in Outlook 2003 that will insert the smile character from the Wingding font when composing an email. Any body have a snippet of code I can use?
 
Macro Recorder is your friend:

Sub MakeMeHappy()

Selection.TypeText Text:="J"
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Font.Name = "Wingdings"
End Sub

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Thanks for the quick response! I tried the code, but I get Runtime Error 424 "Object Required".

Also, Outlook 2003 doesn't have the macro recorder anymore.
 
You are correct. My mistake. It seems that the Outlook 2003 Security model makes it much more difficult to get at the body of an email than it previously was. I'll have to look into this further.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Thanks much. I appreciate your willingness to help out.
 
From my research it is no longer possible. The security changes made in Outlook make it impossible to get the current cursor position within the mail body hence it is not possible to determine where to insert the character. There are some third party plugins that purport to give you this ability, but I have no knowledge of the validity of their claims.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Dang. Oh well, we tried.

Thanks for your help.
 
I am by no means a VBA guru and I am definitely not an Outlook VBA guru, so perhaps one will come along and prove me wrong.

You might htink about making the macro in Word then having the user use Word as their email editor. I don't know if that would work or not, but at least you know you can make the macro work in word. I just don't know if it would do what you expected when word was being used to edit an email.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top