featured_spectre Posted December 23, 2014 Posted December 23, 2014 I am trying to get a piece of code to copy an entire word document, and then input a signature at the bottom of the document. I would use the word function for send as, however this needs to have the option to add the signature (some of 1, 2 or 3 signatures so I'd edit that line). Unfortunately, the signature seems to input itself at the top of the email, rather than the bottom, so any help to fix it would be appreciated. Sub Send_Email() FileOpen = Options.DefaultFilePath(wdDocumentsPath) Selection.WholeStory Selection.Copy Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objInspector As Outlook.Inspector Dim objDoc As Word.Document Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg .Subject = "" .BodyFormat = olFormatHTML .Display End With Set objInspector = objOutlook.ActiveInspector If Not objInspector Is Nothing And objInspector.EditorType = olEditorWord Then Set objDoc = objInspector.WordEditor End If objDoc.Range.Paste Set objDoc = Nothing Set objOutlookMsg = Nothing Set objInspector = Nothing Set objOutlook = Nothing SendKeys "^{END}" SendKeys "%NAS" SendKeys "{ENTER}" End Sub
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now