New message signature name is stored in the 0x0016001F property, reply signature is in 0x0017001F. If using Redemption is an option (I am also its author), you can use its RDOAccount object (accessible in any language, including VBA). Outlook Object Model does not expose signatures or accessing arbitrary properties on accounts. You can see the interface and its data in OutlookSpy (I am its author) if you click the IOlkAccountManager button. Since that interface is Extended MAPI, it can only be accessed using C++ or Delphi. On a general note, the name of the signature is stored in the account profile data accessible through the IOlkAccountManager Extended MAPI interface. Embedded image attachments and styles must be handled separately. if you want to insert your string at the top of the HTML body, look for the (this takes care of the elements with attributes), then insert your HTML string after that >. Note that you cannot simply concatenate 2 HTML strings - the strings need to be merged. Once the signature is added, read the HTMLBody property and merge it with the HTML string that you are trying to set. Outlook adds the signature to the new unmodified messages (you should not modify the body prior to that) when you call MailItem.Display (which causes the message to be displayed on the screen) or when you access the MailItem.GetInspector property - you do not have to do anything with the returned Inspector object, but Outlook will populate the message body with the signature. Subject = "Important! - Insurance Alert!" "" & "Hewden Supply Chain Department" & "" & "" "" & "" & "Kind Regards," & "" & vbNewLine & vbNewLine & _ "" & "Please quote your unique Supplier Reference number when providing us with any insurance documents and in the even that you should have any enquiries." & "" & vbNewLine & vbNewLine & _ "" & Range("AB" & ActiveCell.Row) & "" & vbNewLine & _ "" & "Your Reference:" & "" & vbNewLine & vbNewLine & _ If you have any queries, please email us at & vbNewLine & vbNewLine & _ Regrettably, failure to provide us with the information requested will result in suspension of your account. In order to provide us with the above information, please login to your Control Panel with your unique Username and Password and attach your documents. If your insurance is in the name of a parent company, please provide a breakdown of the companies covered from your insurer. "Please ensure that the above information is provided by your insurance broker, or your insurer, in the form of a standard letter or certificate. "Due for Period: " & "" & Format(Range("BE" & ActiveCell.Row), "dd" & " Mmmm " & "yyyy") & "" & " - " & "" & Format(Range("BE" & ActiveCell.Row) + 365, "dd" & " Mmmm " & "yyyy") & "" & vbNewLine & vbNewLine & _ Please can you provide us with these details for the following insurance as soon as possible, in order to remain active on our systems:" & vbNewLine & vbNewLine & _ "Our records show that your insurance is due to expire on: " & "" & Format(Range("BE" & ActiveCell.Row), "dd" & " Mmmm " & "yyyy") & "." & "" & " To ensure that you remain active on our systems as an approved Hewden Stuart Ltd Supplier, it is important that you provide us with the details of your renewed insurance policy. "" & "This is an urgent update on the status of your account." & "" & vbNewLine & _ Strbody = "" & "Dear Sirs," & "" & vbNewLine & vbNewLine & _ Set OutApp = CreateObject("Outlook.Application") If Target.Row > 7 And Target.Value = "Take Action" Then If Target.Column = Range("BL1").Column Then How could I amend my code to put this in? Private Sub Worksheet_SelectionChange(ByVal Target As Range) I want to add a signature, with an image, to my email body. I use this VBA code to send an email when a user clicks a cell in a row.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |