By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,704 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,704 IT Pros & Developers. It's quick & easy.

SendObject Method

JustJim
Expert 100+
P: 407
Hi All,
I know this is not strictly an Access Problem, but hopefully some advice will be forthcoming.

When I execute
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendNoObject, , acFormatRTF, strEmailAddress, , , strEmailSubject, strEmailBody, True
all is well and an email starts on my user's Outlook compose screen...

But... when the e-mail is sent, Outlook doesn't add her signature block to the email. It does add the department she works for's disclaimer!

There are no arguments left in the SendObject method, does anyone have any ideas how to tell Outlook to do what I want (which by the way, is to send an email just as if my users have clicked New in Outlook and typed it themselves)

Jim
Dec 11 '07 #1
Share this Question
Share on Google+
12 Replies


ADezii
Expert 5K+
P: 8,669
Hi All,
I know this is not strictly an Access Problem, but hopefully some advice will be forthcoming.

When I execute
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendNoObject, , acFormatRTF, strEmailAddress, , , strEmailSubject, strEmailBody, True
all is well and an email starts on my user's Outlook compose screen...

But... when the e-mail is sent, Outlook doesn't add her signature block to the email. It does add the department she works for's disclaimer!

There are no arguments left in the SendObject method, does anyone have any ideas how to tell Outlook to do what I want (which by the way, is to send an email just as if my users have clicked New in Outlook and typed it themselves)

Jim
Within Outlook, do you have the Add signatures to all outgoing messages check box selected? (Tools, Options, Signature Tab).
Dec 12 '07 #2

JustJim
Expert 100+
P: 407
Within Outlook, do you have the Add signatures to all outgoing messages check box selected? (Tools, Options, Signature Tab).
In Outlook 2003 SP2 there ain't a Signature Tab, but I found a Mail Format Tab which had Signature for new messages and a listbox of choices. Also on that tab was a Compose in... combobox which was set to HTML. Hmm thinks I.

I changed that option to RTF and used my same code... no signature. I put the Compose in... option back to HTML and changed my code to
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendNoObject, , acFormatHTML, strEmailAddress, , , strEmailSubject, strEmailBody, True
Still no signature.

The heck with it! Only one user will be using this feature, I'm just going to hard code a signature block along with the body text already coded in strEmailBody.

Thanks anyway and if I don't catch you in the lists before it, have a great Christmas and a Safe New Year.

Jim
Dec 12 '07 #3

JustJim
Expert 100+
P: 407
Just noticed something interesting, no matter if I export as acFormatHTML or acFormatRTF, Outlook uses Word as the editor and in the title bar shows Plain Text. Even if I turn off Word as the e-mail editor for new messages!

Jim
Dec 12 '07 #4

ADezii
Expert 5K+
P: 8,669
In Outlook 2003 SP2 there ain't a Signature Tab, but I found a Mail Format Tab which had Signature for new messages and a listbox of choices. Also on that tab was a Compose in... combobox which was set to HTML. Hmm thinks I.

I changed that option to RTF and used my same code... no signature. I put the Compose in... option back to HTML and changed my code to
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendNoObject, , acFormatHTML, strEmailAddress, , , strEmailSubject, strEmailBody, True
Still no signature.

The heck with it! Only one user will be using this feature, I'm just going to hard code a signature block along with the body text already coded in strEmailBody.

Thanks anyway and if I don't catch you in the lists before it, have a great Christmas and a Safe New Year.

Jim
The same goes for you Jim, have a happy Holiday!
Dec 12 '07 #5

Denburt
Expert 100+
P: 1,356
Just noticed something interesting, no matter if I export as acFormatHTML or acFormatRTF, Outlook uses Word as the editor and in the title bar shows Plain Text. Even if I turn off Word as the e-mail editor for new messages!

Jim
That is interesting, I might just have to look at that.

I did do a little digging, and from what most people are saying is that the signature can be placed in the body automatically as you create a new email, but as soon as you make changes to the body (in VBA) the sig is replaced. If this is in fact what is happening then I would think you could extract the signature before changing the body and add it to the body you are changing it to. Although the following link is for use in Outlook it may help accomplish such a task.

http://www.outlookcode.com/codedetail.aspx?id=615
Dec 12 '07 #6

JustJim
Expert 100+
P: 407
That is interesting, I might just have to look at that.

I did do a little digging, and from what most people are saying is that the signature can be placed in the body automatically as you create a new email, but as soon as you make changes to the body (in VBA) the sig is replaced. If this is in fact what is happening then I would think you could extract the signature before changing the body and add it to the body you are changing it to. Although the following link is for use in Outlook it may help accomplish such a task.

http://www.outlookcode.com/codedetail.aspx?id=615
Thanks for that. It's a little complex and, as you say designed for use in Outlook. Going through it so I understand it and then transcribing it to control Outlook from Access sounds like a wonderful holiday entertainment (I am one weird puppy!)

Happy <insert observed holiday here>

Jim
Expand|Select|Wrap|Line Numbers
  1. Smile.Width = Gift.Value * Giver.Love^2
Dec 12 '07 #7

Denburt
Expert 100+
P: 1,356
Just a quick follow up here. So far I have been unable to retrieve the signature using CDO (which is what I normally use to send emails) and I am currently unable to use sendObject because I am currently running two version of office and they are conflicting. I can't send anything via Outlook from any of my other office apps. LOL However I did manage to retrieve the signature using Outlook and new mailitem (see link below). I currently have my settings in Outlook to send the signature with all new email items. The interesting thing is that the signature is not placed in the email until it is displayed on screen. Go figure. Once you use the .display option you can use the .body to extract the signature then do as you please with it.

Hope this helps, good luck.

http://support.microsoft.com/kb/161088
Dec 20 '07 #8

JustJim
Expert 100+
P: 407
<snip> you can use the .body to extract the signature then do as you please with it.
Must be the holiday season. If you "do as you please" with the .body then you are going to have to pay for it!

Happy New Year

Jim
Oops, I messed up the quote codes, Happy New Year anyway
Jan 2 '08 #9

Denburt
Expert 100+
P: 1,356
Must be the holiday season. If you "do as you please" with the .body then you are going to have to pay for it!

Happy New Year

Jim
Oops, I messed up the quote codes, Happy New Year anyway
ROFLMAO
Fixed the quotes for you...

First I would like to say that I have never abused the body of an email before but then that brings to question what is abuse of an email body...

Second I have never paid for the use of a .body, unless you include the many credit cards my wife has, oh and the ring on her finger/fingers, the earrings she wears, and the bank account that doesn't exist anymore, etc. seriously I am just joking (in case she reads this).
Yeah sometimes I forget to explain myself in enough detail for some of you with your minds in the gutter and all but don't worry I understand it must be the holidays, maybe you should ease up on the Eggnog and such.

Well you have a Happy New Year as well.
Jan 2 '08 #10

JustJim
Expert 100+
P: 407
ROFLMAO
Fixed the quotes for you...

First I would like to say that I have never abused the body of an email before but then that brings to question what is abuse of an email body...

Second I have never paid for the use of a .body, unless you include the many credit cards my wife has, oh and the ring on her finger/fingers, the earrings she wears, and the bank account that doesn't exist anymore, etc. seriously I am just joking (in case she reads this).
Yeah sometimes I forget to explain myself in enough detail for some of you with your minds in the gutter and all but don't worry I understand it must be the holidays, maybe you should ease up on the Eggnog and such.

Well you have a Happy New Year as well.
Thanks Denburt,

It was difenatly an excess of Nogegg and I'll eese up on it as soon as I have to go back to wurk. (hic)

Hopefully another kindly moderator will quarantine your comments about the Wife.Body object (if there are any methods or events, I do not want to hear them, thanks)

Hang on, aren't you from Louisiana? I visited New Orleans once for a President's day long weekend and had about three Hurricanes, a Po'Boy and some sort of clear liquid in a dark green bottle. I got over the hangover about a year and a half later!

Jim
Jan 4 '08 #11

Denburt
Expert 100+
P: 1,356
Hey sorry I haven't been on much but I had to reply. You drank what? Just an FYI if you drank some clear liquid in a dark green bottle...... I could sure mess with you here lol and you aren't still walking around in a daze? Our Hurricanes do pack a punch and with Mardi Gras knocking on the door hurricane season is just getting started. Glad you got to eat a Po'Boy while you were down did you get to try any gumbo, or etouffee? Do you Aussie's have any Gators? I know you have Crocs up there are yall allowed to eat them? I have always been curious to know if there is a difference in the meat. Gators are one of my favorites Mmmm good.
Jan 30 '08 #12

JustJim
Expert 100+
P: 407
Hey sorry I haven't been on much but I had to reply. You drank what? Just an FYI if you drank some clear liquid in a dark green bottle...... I could sure mess with you here lol and you aren't still walking around in a daze? Our Hurricanes do pack a punch and with Mardi Gras knocking on the door hurricane season is just getting started. Glad you got to eat a Po'Boy while you were down did you get to try any gumbo, or etouffee? Do you Aussie's have any Gators? I know you have Crocs up there are yall allowed to eat them? I have always been curious to know if there is a difference in the meat. Gators are one of my favorites Mmmm good.
Way off thread...

Sure, and it's easy. Grab a knife and fork, jump in a river. The one who eats the other one wins!

Actually, in the wild all native Australian animals are protected (even the seven most venomous snakes in the world, and a species of spider that can kill a horse from 50 yards just by looking at it the wrong way). There are farmed crocs which are used for meat, leather etc and are supposed to be very tasty.

Australia is the only country I know of where we are allowed to eat both the animals on the national emblem (the kangaroo and the emu).

We are currently going through our annual convulsion against the Japanese whaling fleet conducting "scientific" whaling. There's a certain irony there I think.

Jim
Jan 31 '08 #13

Post your reply

Sign in to post your reply or Sign up for a free account.