vba - Reordering of text and attachment in Outlook Email -


I am creating an email from a macro (excel file macro) and trying to sandwich the attachment through text.

After the attachment has been added, I want my body, file, signature

  set olMailItem = olApp.CreateItemFromTemplate (EmailFilePath) olMailItem 'with the search and instead of the subject "key metrics" tab for "KW # #". Click on Subject = Replace (Subject, "KW ##", KW). Attachments.Add ("H: \ QA \ QA Mgmt \ Presentations \" & Report (R). Filename). Body =. Body & amp; GetSignature (emailTemplatePath & "EmailSignature.txt").   

EmailFilePath is the path of an msg file with an existing file and reciepients displayed.

The attachment can be placed within the body itself, when the "bodyformat" Rich Text "

You can do this by applying the following line of code to your function:

 . Bodyformat = oleformatrichtext '3 also works   

implementation

  set olMailItem = olApp.CreateItemFromTemplate (EmailFilePath) olMailItem' **** this line vvvv **** Add. BodyFormat = olFormatRichText '3 also works' search and replace theme for "KW # #" to KW from "Key Metrics" tab. Subject = Replace (Subject, "KW ##", KW). Attachment.Add ("H: \ QA \ QA MGMT \ Presentations" and Report (R) .filename). Body =. GetSignature (emailTemplatePath & "EmailSignature.txt").   

with the end displayed; In addition, 3 parameters of "attachment.ad" are "status" and it is 0 by default, but this number indicates the character within the body that the attachment will be located. If your number is greater than the total amount of letters, then it will be automatically placed at the end. If your number is 1 then it will be kept in the beginning.

It should work fine, just change the number of position parameters

 . Attachments. Add Source: = "H: \ QA \ QA MGMT \ Presentations" & amp; Report (R) .Filename, Status: = 100   

More about Outlook Attachments:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -