C
ChrisK
Hi all,
I'm using the following code snippet to create email in Outlook from Access:
Dim appOutlook As Outlook.Application, msg As Outlook.MailItem
On Error GoTo ErrHandler:
Set appOutlook = GetObject(, "Outlook.Application")
Set msg = appOutlook.CreateItem(olMailItem)
With msg
.To = strTo
If strSubject <> "" Then .Subject = strSubject
If strBody <> "" Then .Body = strBody
.Display
End With
Is there a method to bring the Outlook mail item window to the front when
this sub is run? At the moment, when the sub is run, the message is created
but doesn't come to the front
CK
I'm using the following code snippet to create email in Outlook from Access:
Dim appOutlook As Outlook.Application, msg As Outlook.MailItem
On Error GoTo ErrHandler:
Set appOutlook = GetObject(, "Outlook.Application")
Set msg = appOutlook.CreateItem(olMailItem)
With msg
.To = strTo
If strSubject <> "" Then .Subject = strSubject
If strBody <> "" Then .Body = strBody
.Display
End With
Is there a method to bring the Outlook mail item window to the front when
this sub is run? At the moment, when the sub is run, the message is created
but doesn't come to the front
CK