Outlook, sendobject and VBA references -
10-06-2011
, 06:36 AM
Hi everyone,
A few weeks ago, I posted a note about Outlook application coding to
which I have had some minor success. It's not there yet, but I'm
working on it. For whatever reason, the whole problem seems to go
deeper than I have any hope of understanding and no depth of Googling
forums or user other user groups etc has helped. I have tried
countless options, none of which have worked.
The long and short of it is that for ages, I have been successfully
using the sendobject option with absolutely no problems whatsoever, no
matter what email client was being used. Now, however, it's all come
crashing down. No matter what I am doing, I keep on getting an error
that I either cannot send (error 2293) and as of today, I am getting
an error 2046, the sendobject command is not available. Oh yeah, it
does not matter if I am coding for ACC2K on WinXP or Win 7; or ACC2010
on WinXP or Win 7, native mdb format for either option on either OS.
All clients now have either Outlook 2007 or 2010. Really oddly, I can
send for those clients who have ACC2010 runtime installed, but not for
those who have ACC2010.
So, today I went back to "first principles" and made a new db with a
single table (with only one field and entry - just felt like it), one
form, and one report and tried options of the following code to no
avail:
DoCmd.SendObject acSendReport, "main_rpt", acFormatHTML, , , , "test
send", "test message", , True
The form in the dev file has a single command button to email the
single report. On the dev file I made today, I keep getting the 2046
error, no matter what option I use eg acSendReport, acSendNoObject,
html, rtf, user email or not etc. Have I missed something in the
references? Currently I have :
VBA
MS Access 14.0 Library
OLE Automation
MS Access Active X data objects 6 library
MS DAO 3.6 Library
I understand and use the appropriate 9.0 libraries for those who are
not yet on Office 14 and the 14.0 libraries for those what are.
French parent company have not yet seen the light and upgraded all ;-
( Are there now global declarations etc I need to use?
So, any ideas and suggestions would be most welcome. I'm tearing out
what little hair I have left. C'mon, it has to be simple. Right?
Stinky Pete :-) |