Hi
I'm looking a way to save via Access an e-mail received in Outlook to a folder as determined in an open Access form.
The code I'm trying is along the lines of:
The problem is what to put in the "set objEmail" line to refer to the active email or window in Outlook.
I have tried using the "ActiveWindow" command without any success.
Is the above code along the right lines or am I way off the mark.
Thanks in advance
AL
I'm looking a way to save via Access an e-mail received in Outlook to a folder as determined in an open Access form.
The code I'm trying is along the lines of:
Code:
Sub SaveEmail()
Dim myOlApp As New Outlook.Application
Dim objEmail As Outlook.MailItem
set objEmail = ?????????????????
With objEmail
.SaveAs Forms("formname").Controls("docfolder").Value & "\Email - Draft Report.htm", olHTML
End Sub
The problem is what to put in the "set objEmail" line to refer to the active email or window in Outlook.
I have tried using the "ActiveWindow" command without any success.
Is the above code along the right lines or am I way off the mark.
Thanks in advance
AL