How do I remove old signatures from Outlook forms?
-
21-08-2019 - |
Question
I modified an existing form and saved it on my desktop as .oft file. Whenever I send this form I have an old signature that shows.
If I double click the .oft file I see the body with that old signature and then my newer one below it. I would like to delete that old signature that is stuck in the body. What confuses me is that when I open that file in Outlook forms it never includes a signature in messages, which is why when I run the form I don't see this signature except when I send it, I see it in preview when I open the message I see my Outlook form as it should be.
I managed to save the file as html. I see the signature on the bottom of the page.
How can I remove or modify the html file to remove that signature and get back the original oft file.
I also tried saving as html, removing the signature, saving, then using a macro to load the html. But unable to save back to oft.
Sub MakeHTMLMsg()
Set objMsg =3D Application.CreateItem(olMailItem)
Set fso =3D CreateObject("Scripting.FileSystemObject")
Set ts =3D fso.OpenTextFile("c:\testfile.htm", 1)=20
strText =3D ts.ReadAll
objMsg.HTMLBody =3D strText
objMsg.Display
Set fso =3D Nothing
Set ts =3D Nothing=20
Set objMsg =3D Nothing
End Sub
Solution 2
got it, add message box. then go to run this form. and voila. remove the unwanted signature. save as
thank you
OTHER TIPS
If you or a collaborator accidentally saves an .oft Outlook Form with RTF in the message body (which includes signatures), this rich text will be forever stuck in the .oft, as far as I can tell (unless you decide to hack it up in a hex editor). As others suggest in the dark corners of the web, you can run the form, delete the message body, and save it as an .oft - but unfortunately, this does not work with RTF. The RTF is stuck. The only way I have found to hide this text is with this VBScript Outlook macro to change the MailItem's BodyFormat type to plain text. The RTF bytes will remain in your .oft, but at least no one will be looking at them.
Sub ChangeToPlainTextAndPublishForm()
Dim objOL ' As Outlook.Application
Dim objItem ' As Outlook.ContactItem
Dim objFD ' As Outlook.FormDescription
Const olPersonalRegistry = 2
Const olDiscard = 1
Set objOL = CreateObject("Outlook.Application")
Set objItem = objOL.CreateItemFromTemplate("C:\MyPath\MyForm.oft")
Set objFD = objItem.FormDescription
objItem.BodyFormat = OlBodyFormat.olFormatPlain
'Publish to personal forms library
With objFD
.DisplayName = "myForm"
.PublishForm olPersonalRegistry
End With
objItem.Close olDiscard
Set objFD = Nothing
Set objItem = Nothing
Set objOL = Nothing
End Sub