SendObject ?

TimmieTheGeek

New member
Joined
Feb 25, 2010
Messages
2
Location
Newburgh, Indiana
Programming Experience
10+
In an Access 2007 application, I can do the following command, which will automatically compose a new email in my Lotus Notes application (which is running at the time). The Lotus Notes new memo window will be displayed and I can add contacts, attach files and send the mail.

DoCmd.SendObject acSendReport,
strReport,
acFormatPDF,
strTo,
strCc,
strBcc,
strSubject,
strMessage,
blnEdit

In a VB.net 2008 application I do a similar operation as follows:

Dim oAccess As Access.Application
oAccess = New Access.ApplicationClass()
oAccess.DoCmd.SendObject(Access.AcSendObjectType.acSendReport,
strReportFileName,
strFormat,
strTo,
strCc,
strBcc,
strSubject,
strMessage)

I have all my references defined correctly as far as I can tell, but in my VB app when I do the above SendObject command it fails with the message:

The command or action "SendObject" isn't available now.

This is confusing because the same command works fine when called from Access.

Does anyone have any ideas on why I can't do this command in VB?

Tim
 
Back
Top