将word文档粘贴到电子邮件的底部而不是顶部

时间:2019-05-07 19:19:03

标签: excel vba email

如何将Word文档的内容复制并粘贴到VBA电子邮件对象的底部而不是顶部?我目前的做法是,即使首先建立电子邮件的正文,单词文档也会自动粘贴在消息的开头。

要粘贴doc一词,我使用以下帮助:How to send a Word document as body of an email with VBA

    Dim wd As Object, editor As Object
    Dim doc As Object
    Set wd = CreateObject("Word.Application")
    Set doc = wd.documents.Open("word address", ReadOnly:=True)
    doc.Content.Copy

Set Mail_Object = CreateObject("Outlook.Application")
        With Mail_Object.CreateItem(o)
            .Subject = "subject"
            .To = "to"
            '.BodyFormat = olFormatHTML
            'Set editor = .GetInspector.WordEditor
            'editor.Content.Paste
            .htmlbody = "this should be at top"
            .Display 

        Set doc = Mail_Object.ActiveInspector.WordEditor
            doc.Application.Selection.Paste

0 个答案:

没有答案