![]() |
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
|
|||
|
|||
![]()
I want to create a command button in Outlook 03 that would automatically
insert an email signature. One way was to copy the signature, record a new macro and then click paste. These instructions I found online don't work becuase all the macro is doing is pasting whatever is in the clipboard. If you copy something else or restart the PC the macro fails. So I think the best way is to hardcode it using VBA. I have the following example that I found online and it works except it does not account for formatting. One of the owners of the business I work for wants the ability to easily insert a signature. However, he would also like to be able to select the font for the sig which may or may not be the same as the message body. I need to be able to program the selected font, size, and bold/italic directly into the code below. I've never done this - does anyone know where I could find an example of this online or be able to tell me how to do it? Oh, and you'll notice I commented out the last line in the following code "MyRange.InsertAfter (MyText)" if I don't comment it out the text is printed twice? Thanks, Jason Sub InsertAfterMethod() Dim MyText As String Dim MyRange As Object Set MyRange = ActiveDocument.Range MyText = "Jason Kaloyanides" '& vbCrLf & "Job Title" & vbCrLf & "Address" ' Selection Example: Selection.InsertAfter (MyText) ' Range Example: ' (Inserts text at the current position of the insertion point.) MyRange.Collapse ' MyRange.InsertAfter (MyText) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create macro to insert signature into email... | Fuel451 | Outlook and VBA | 8 | December 31st 09 02:26 PM |
How do I add the button that inserts my signature in new email? | Mommyanna91701 | Outlook - Installation | 3 | August 29th 08 06:54 PM |
Signature Button and Insert Signature Missing | Bill Glidden | Outlook - General Queries | 2 | December 19th 06 08:42 AM |
Command buttons when using word as email button | [email protected] | Add-ins for Outlook | 1 | October 9th 06 09:27 PM |
Delete Excel Command Button Before Email is Sent | White Horse | Outlook and VBA | 1 | April 28th 06 06:01 AM |