using SendObject email with edit set to true - Can I get access to what was sent

atrium

Registered User.
Local time
Tomorrow, 02:08
Joined
May 13, 2014
Messages
348
I want Access to use SendObject to create an email with edit set to TRUE to allow the user to add or edit the body of the email. Once it is sent I want access to be able to store the body of the sent email in a table.

When the user updates the body content is the .body field updated?

Any Help would be appreciated

Atrium
 
I think we could provide better help if you post the code you have so far but there's no reason to believe that a table field is going to be updated without any explicit action in your code.
 
Last edited:
I've never tried to do what the OP is asking.

Seems to me that having generated an email using docmd.SendObject and then a user changing the body of the email, that the email would have to be saved, then something to trigger in Access to set a reference object to that email so that the body text could be accessed in order to save it in a table.

I think I would be inclined to look for some trigger event in Outlook (if indeed that is the email client being used) to automate accessing the Access table to save the body.

Alternatively, maybe another solution would be for Access to be set up to regularly loop through all sent emails and extract the body message to the table for those emails not yet recorded.
 
You can do this from Outlook by opening an Outlook Application Object, setting up your context (which is something that has been posted in the forum a few times), creating the mail message object, and then opening something called an Inspector.

At this point, you are in the selected Outlook mail editor (these days, usually Word) and can do what you need. You can manually update the To:, CC:, and BCC: lists, change the subject, and attach objects. You can set importance, set encrpytion (if that's what you needed), and do a few other useful things.

When you are finished with all the required gyrations, THEN you can do the .Send operation. However, once you send it, depending on your Outlook settings, it moves to the Sent Items folder within your .PST file and at that point, editing is sort of like closing the barn door after the horses have escaped.

I don't think I've ever used the raw .SendObject because I've always needed to give the users a way to update the messages they are sending, so I have always used the Outlook App Object methods.

If you were using CDO (Collaboration Data Objects), you could send messages via SMTP but I don't know that you can so easily edit that message before sending it. There, I think the moment you activate CDO with a message having the required parts, that message is gone.
 

Users who are viewing this thread

Back
Top Bottom