View Single Post
  #10  
Old December 28th 09, 03:37 PM posted to microsoft.public.outlook.program_vba
Curt
external usenet poster
 
Posts: 19
Default picture

Your code for Euro seems it could be modifyed for my applicatio. I have used
excel & word macros yet do not understand outlook vba. I want to insert my
signature with a picture in new mail. Outlook will allow this on reply or
forward only. Need a macro that will work on new mail. Any direction
appreciated.
Thanks
Sub Euro()
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
' get a Word.Selection from the open Outlook item
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
' now do what you want with the Selection
objSel.TypeText "€"
Set objDoc = Nothing
Set objSel = Nothing
End Sub


"Sue Mosher [MVP]" wrote:

You probably just need to modify your code so that it uses a Word.Selection
object deriveed from the Outlook item you're working with. I've posted an
example at
http://turtleflock-ol2007.spaces.liv...E3D8!579.entry
that shows how to do that.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Petersen" wrote in message
...
I'd like to assign a macro in Outlook 2007 to a Toolbar button that would
execute the equivalent of these clicks when there is formatted text in the
Windows clipboard:

1. Click the Paste icon by the bottom arrow
2. Click the Paste Special link.
3. Click the Unformatted Text link.

I have similar macros in Excel 2007 and Word 2007 but haven't been able to
get one to work in Outlook 2007 / VBA. What would the VBA code for such a
macro be?

When I try code similar to what I use in Word, I get a Run time error
'424'
Object required error. I'm obviously not defining an object correctly,
but
I've not been able to figure out how to do that properly. Thanks for the
help.

--
Gary Petersen




Ads