M
Mike Whitaker
I'm trying to send an email from Access through Outlook (both XP).
The issue is that I'm getting two blank emails brought to the screen, one
addressed correctly (from the code), and the other one blank. Needless to
say, I only want the correct one.
Any thoughts would be appreciated.
Cheers,
Mike
The code is;
Public Function MakeEmail(StrAddress as string, strSubject as string)
Dim O as Outlook.Application
Dim E as Outlook.MailItem
Set O=new Outlook.Application
Set E=O.CreateItem(olMailItem)
E.To=strAddresss
E.Subject=strSubject
E.Display
set E=Nothing
Set O=Nothing
End Function
The issue is that I'm getting two blank emails brought to the screen, one
addressed correctly (from the code), and the other one blank. Needless to
say, I only want the correct one.
Any thoughts would be appreciated.
Cheers,
Mike
The code is;
Public Function MakeEmail(StrAddress as string, strSubject as string)
Dim O as Outlook.Application
Dim E as Outlook.MailItem
Set O=new Outlook.Application
Set E=O.CreateItem(olMailItem)
E.To=strAddresss
E.Subject=strSubject
E.Display
set E=Nothing
Set O=Nothing
End Function