moodyfawzy
New Member
- Joined
- Sep 18, 2022
- Messages
- 1
Dears,
I have used below code to open a mail template stored on my device and it works fine , but I want to paste some copied cells into the body of the template with vba , can u help me ?
Sub OutlookTemplate()
Dim myolapp As Object
Dim myitem As Object
Set myolapp = CreateObject("Outlook.Application")
myolapp.Session.Logon
Set myitem = myolapp.CreateItemFromTemplate("C:\mail\AMS Alarms.msg")
myitem.Display 'or send
End Sub
I have used below code to open a mail template stored on my device and it works fine , but I want to paste some copied cells into the body of the template with vba , can u help me ?
Sub OutlookTemplate()
Dim myolapp As Object
Dim myitem As Object
Set myolapp = CreateObject("Outlook.Application")
myolapp.Session.Logon
Set myitem = myolapp.CreateItemFromTemplate("C:\mail\AMS Alarms.msg")
myitem.Display 'or send
End Sub