SendObject

V

Vincdc

I want to use "SendObject" Macro to send a query into Excel spreadsheet.
However, I found this one does not work. When I run the macro, it does not
send the query by email. Any suggestion?
Thanks in advance!

Vincent
 
T

Tom Wickerath

V

Vincdc

Hi Tom,
I am using Access2002.
Object Type is table.
Object Name is the name of table I want to send out.
Output Format is Excel.
....
I did not use a template file and did not set any conditions for the macro.
I am wondering if there is anything to do with my Outlook. Do I need to
configure my Outlook settings?
Thanks a lot!

Vincent
 
T

Tom Wickerath

Hi Vincent,

Try converting your macro to VBA code, and then post the code into a reply
to this newsgroup. Off-hand, I don't see anything wrong with what you are
doing, but perhaps seeing the equivalent code will reveal something. To
convert your macro to VBA code, close the macro first. Then select it in the
Database Window, and click on Tools | Macro | Convert Macros to Visual
Basic...

This command will convert all macros within a macro group to VBA code. (The
macro group may contain one or more macros).

You shouldn't need to configure anything in Outlook.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
V

Vincdc

Hi Tom,
It works in the VB mode. I think that I will use the VB mode then.
Thanks a lot!

Vincent
 
T

Tom Wickerath

Hi Vincent,

I'm glad to read of your success. Personally, I much prefer using VBA code
over macros, even given the improvements that Microsoft has made to macros in
A2007. In Access 2003 and all prior versions, one cannot trap for errors and
handle them gracefully when using macros. Any errors that occur will cause a
really ugly macro error dialog to be presented to your users. The newest
version of Access, Access 2007 allows for error trapping, so macros are more
appropriate to consider using for Access applications created with Access
2007.

Consider the following quote:

From: "Inside Relational Databases, 2nd Edition, by Mark Whitehorn and Bill
Marklyn, published by Springer, p 151

"Macros offer the next level down, extending the functionality of the GUI.
Macros are still limited, however, and do not provide anything like the
enormous flexibility of a programming language. Both the macro and the
programming languages take some effort to learn and, surprisingly, often
require relatively different skills; in other words, a good working knowledge
of macros may not make it much easier to convert to using the programming
language. Perhaps even more surprisingly, I do not believe that programming
is fundamentally more difficult to learn. Macros are easier to use but not by
orders of magnitude."

"If you are new to RDBMSs, I suggest (with as much deference as possible)
that you may well not be in a position to judge whether you need macros or
programming. In that case, my advice is clear. Unless you are sure that your
needs really are simple, don't bother learning to use macros. Once you find
that you need more than the GUI offers, go straight to the programming
language. In this way you avoid the pain of climbing one learning curve only
to discover that the view from the top is unsatisfactory and another climb
awaits you."


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top