0

我修改了一个现有的表格,并将其作为 .oft 文件保存在我的桌面上。每当我发送此表格时,我都会显示一个旧签名。

如果我双击 .oft 文件,我会看到带有旧签名的正文,然后是下面的新签名。我想删除卡在正文中的旧签名。让我感到困惑的是,当我在 Outlook 表单中打开该文件时,它永远不会在消息中包含签名,这就是为什么当我运行表单时我看不到这个签名,除非我发送它,当我打开它时我会在预览中看到它我看到我的 Outlook 表单的消息。


我设法将文件另存为html。我看到页面底部的签名。

如何删除或修改 html 文件以删除该签名并取回原始文件。

我还尝试另存为 html,删除签名,保存,然后使用宏加载 html。但是经常无法保存。

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
4

2 回答 2

1

如果您或合作者不小心在邮件正文(包括签名)中保存了带有 RTF 的 .oft Outlook 表单,据我所知,此富文本将永远卡在 .oft 中(除非您决定破解它在十六进制编辑器中)。正如其他人在网络的黑暗角落所建议的那样,您可以运行表单,删除邮件正文,并将其保存为 .oft - 但不幸的是,这不适用于 RTF。RTF 卡住了。我发现隐藏此文本的唯一方法是使用此 VBScript Outlook 宏将 MailItem 的 BodyFormat 类型更改为纯文本。RTF 字节将保留在您的 .oft 中,但至少没有人会查看它们。

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
于 2015-02-04T22:30:28.843 回答
0

明白了,添加消息框。然后去运行这个表格。瞧。删除不需要的签名。另存为

谢谢你

于 2009-05-13T22:35:14.800 回答