Afternoon all,
So i have written some code to open an .oft with a subject and email address.
but i want to use bookmarks similar to word, it seems you cant use the .item for outlook.
can anyone point me in the right direction?
Code:
If [Forms]![frmClaims]![chkfirstnotificationemail] = True Then
Dim myOlApp As Outlook.Application
Dim MyItem As Outlook.MailItem
Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.CreateItemFromTemplate("C:\Users\andrewb\Documents\first notification.oft")
With MyItem
.To = Me![Pmail]
.Subject = "Just a quick hello"
.Item("username").Range.Text = StrConv(GetStaffname(GetUser), vbProperCase)
MyItem.Display
End With
End If
Thank you in advanced