

HTMLBody = "" & pnamebox.Text & "" '(etc. This does mean you might need to add some basic HTML tags around any text you put into the subject to have it show up like you want, but you can do that just by adding them as strings in your HTMLBody. If your signature has any kind of formatting in it (most business e-mail signatures I see do) you will want to use HTMLBody to have it retain the formatting. Subject = "Abgabe " & pnamebox.Text & " " & vnummerbox.TextĪlso you'll notice I used HTMLBody instead of Body. Dim oApp As Outlook.Application = New Outlook.Applicationĭim mailItem As Outlook.MailItem = oApp.CreateItem() Unless you intended to do that, it's probably fine to leave it at the default of false, which lets you click on Outlook while the e-mail window is open. Also setting it to true isn't what makes it visible, that's an option that makes it so you can't click on the Outlook application while the e-mail window is open. Those samples use slightly different methods to generate HTML code. Below, I will present two different sample scripts which create two different signature templates.

In any case I will note that in my experience, I had to have mailItem.Display be the first thing called in the sequence in order to get the signature to be saved properly. First, you need to create a script which will create a personalized HTML email signature for each user. Mostly a duplicate of this? Inserting Signature into Outlook email from Excel VBA
