What's the syntax for creating a new mail item in VBA when not referencing libraries?
I have made the following definitions:
Dim olApp As New Object
Dim olNameSpace As Object
Dim olMail As Object
and have created the new Outlook Application:
Set olApp = CreateObject("Outlook.Application")
Set olNameSpace = olApp.GetNamespace("MAPI")
but the following statement gets a syntax error,saying that olMailItem was not defined:
Set olMail = olApp.CreateItem(olMailItem)
What is the appropriate syntax?