ThrottleWorks
Excel Ninja
Hi
I need help for editing and existing e-mail saved on a drive.
Please see below details for your reference.
User have saved an e-mail at his drive.
We have an Excel macro.
Path of this email is saved in a cell in the macro.
Macro needs to open the e-mail on the base of path mentioned in the cell.
Once opened, macro needs add 3,4 text lines in the e-mail body.
These lines are saved in the macro itself in a worksheet.
Below these lines, macro needs paste a range copied from another worksheet of the macro.
So lines will be something like, hi, please find attached, review, in that sense.
Below these lines and Excel range, let us say A1:C50 with the its formatting.
I am able to open the email, write simple HTML based text line in the body.
However am not able to paste the ranges in existing email.
Can anyone please help me in this.
This is the basic code I am using to open the email.
I need help for editing and existing e-mail saved on a drive.
Please see below details for your reference.
User have saved an e-mail at his drive.
We have an Excel macro.
Path of this email is saved in a cell in the macro.
Macro needs to open the e-mail on the base of path mentioned in the cell.
Once opened, macro needs add 3,4 text lines in the e-mail body.
These lines are saved in the macro itself in a worksheet.
Below these lines, macro needs paste a range copied from another worksheet of the macro.
So lines will be something like, hi, please find attached, review, in that sense.
Below these lines and Excel range, let us say A1:C50 with the its formatting.
I am able to open the email, write simple HTML based text line in the body.
However am not able to paste the ranges in existing email.
Can anyone please help me in this.
This is the basic code I am using to open the email.
Code:
Sub OpenEmail()
Call DefineWorksheets
Dim olApp As Object
Dim olMail As Object
Dim strPath As String
strPath = Sht_TMPLT.Range("D34").Value
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItemFromTemplate(strPath)
olMail.Display
Set olMail = Nothing
Set olApp = Nothing
End Sub