hi, I am a new novice programmer...
and I'm trying to attach a Word document to an Outlook email that I open from Access....
here are a few lines of the code I am trying to use
Dim oMailApp As New Outlook.application
Dim oMail As MailItem
I don't understand these statements:
Set oMailApp = CreateOject("Outlook.Application"
Set oMail = oMailApp.CreateItem(olMailItem)
I get the following message:
compile error:
sub or function not defined
on the "CreateObject()" line...
So CreateObject is either a function or a subroutine, but what should CreateObject do?
Docmd.SendObject ?
I've already set the references to the object library on the VBA editor....
so now I'm stuck...
jmp
and I'm trying to attach a Word document to an Outlook email that I open from Access....
here are a few lines of the code I am trying to use
Dim oMailApp As New Outlook.application
Dim oMail As MailItem
I don't understand these statements:
Set oMailApp = CreateOject("Outlook.Application"
Set oMail = oMailApp.CreateItem(olMailItem)
I get the following message:
compile error:
sub or function not defined
on the "CreateObject()" line...
So CreateObject is either a function or a subroutine, but what should CreateObject do?
Docmd.SendObject ?
I've already set the references to the object library on the VBA editor....
so now I'm stuck...
jmp