SendObject not working first record.

im sure this is something very simple but I cant work out whats wrong.

I am very new to access, I have a form that on Load runs the GoToRecord macro and selects new which should mean im ready to enter a record, at the end is a button to email that record to whichever department needs it. my problem is if you open the form and fill out the data, the email attachment is always blank just with the field names, if you go back into the form and actually click the new record button and fill it out it all works fine

Sponsored Links:

Related Topics

Quick Q about SendObject
Can anyone please tell me how I go about using the SendObject command?

Where do I put the following syntax and how do I link it to a command button on my form?

DoCmd.SendObject [type][, name][, format][, to][, cc][, bcc][, subject][, body][, edit][, template_file]

I've been reading up on it for the past 90 mins to no avail

SendObject - Change from address
I am using SendObject in a database :-

DoCmd.SendObject acReport, stDocName, acFormatPDF, COUemail, , , subject1, "Please see attached a new Carriage Forward Request"

The email works fine but when it opens it automatically gives the users email address as the 'From', I want to put in a different one.

This works in MailModule.SendEmail, but can I get it work in SendObject?

SendObj - working, but can it do this?
I have nocked up a button to send an email with the information gatherd from the record. is it possible to set the emails flag date-due for the person while the email is sent?

the email is sent using the SendObject command

Sendobject for email
Where can I get a document that explains how to use SendObject to send emails from Access?

sendobject acsendreport
Can anyone provide me with an example/syntax of the sendobject command where it uses a template

sendobject acsendreport
Can anyone provide me with an example/syntax of the sendobject command where it uses a template

Emailing a PDF of report but non lossy PDF?
I have a Macro that emails a PDF using the SendObject command, but the PDF attached always loses some quality on the images within it. I have Googled about this and found that there is a setting called acExportQualityPrint and acExportQualityScreen.

Its seems acExportQualityScreen is the default on SendObject though. Is there any way to change this? I see there is this option when you do a OutputTo command, but not on SendObject command.

SendObject Outlook template
I have a Template email message saved as an HTML file that I would like a SendObject macro to use when it opens a new email message.

In the SendObject macro, I have typed the following in the Template File argument:
"C:\Documents and Settings\cimbrie\AA Database\Invoice test Template_files".

I have tested the link by clicking on it in Word and it takes me to the AA Database folder and selects the file. I interpret that to mean the path is right.

The SendObject does not open the template. It just opens a new email.

SendObject with dynamic attachment name
- I am attempting to send a PDF of a report via email and the SendObject function but I don't know how to create the attachment with a dynamic name. What happens is the name of thereport gets passed to the name of the attachment.

DoCmd.SendObject acSendReport, "rpt_Certificate", acFormatPDF, "", , , Subject, Body, Yes, ""

Something similar to this:

error 2501 The SendObject was cancelled
I have a button that opens outlook and puts the forms email address in, click send and everything is good. If I close the email without sending it gives me a runtime error 2501 The SendObject was cancelled. It's only a problem if I do not send an email.

Private Sub txtemail_Click()
DoCmd.SendObject acSendNoObject, , , emailtxt, , True

SendObject - Snapshot format
I'm looking to e-mail a report (from a button on a form), but would like to send it in Snapshot format (or pdf as we've got CutePDF), but I'm struggling to find the appropriate syntax for the SendObject command.

This is how far I've got;

stDocName = "rptSIR"
DoCmd.SendObject acReport, stDocName,

I knowit's the next part, but what?

SendObject - Object already uploaded to access as an attachment
A PDF document that I have already uploaded to access and appended to the record I'm currently viewing.

So what's the problem?

I can't find a way to attach a document I have uploaded to access. I'm not even certain sendobject supports that.

DoCmd.SendObject crashing Access
Yep, exactly what it says in the heading. Anyone have a clue as to why this would happen?

Not used SendObject before so all I wrote was a tiny bit of test code which runs from a command button. The send object line is:

DoCmd.SendObject acSendReport, strSendObjectName, acFormatPDF, strEmailAddTo, , strEmailAddFrom, _
strSubject, strBody

And the strings are just all test values, but contain genuine e-mail addresses etc. But as soon as this runs, Access goes into 'Not Responding' state and then boom, down she goes

Multiple Reports in cmd.SendObject
This code works great to create an email with my report, but I have another report I would like to send, and possibly a third. How can I put in a record seperator, much like ; for email addresses, so that it looks for the second report as well. ; , - '*' none of these work.

DoCmd.SendObject acSendReport, "reportname", "PDF", strTo, ";", , "subject", "Text Body", , 0

Use textbox contents with SendObject command
I am creating a form to send a basic email.

I have already been able to make one that works with the SendObject command and uses an inputbox for the body text.

However, I want to make one that will take the information from a text box and insert it into the body of the email so I can make it easier to write content.

This is what I have

Private Sub EmailButton_Click()
Dim emailaddress As String
emailaddress = ""

Docmd.SendObject , , , emailaddress, , , "Email Subject", EmailBody, True
End Sub

EmailBody is the name of the text box (in red). I am unsure on how to refer to it in the SendObject vba. I have tried me.emailbody, textbox.emailbody and nothing seems to work.

Sendobject method-Multiple objects?
I'm using the docmd.sendobject to send a report as a pdf file in an email, but I would like to be able to send a couple other reports in the same email.

SendObject outlook always allow
I get a message box asking if I want to allow or deny an email message on my behalf when using the "sendobject" macro on Access 2007.

DoCmd.SendObject problem with templates
I have a template that works well if I manually create a new email, it just doesn't show up in the email. The template has of the typical good lookingHTML 'doh-dah' that goes at the end of an email allowing people to link to the web site and so on.

It works if I use CreateItemFromTemplate so I don't suspect the template to be the problem. However I am loath to use this as it does not allow me to track whether the user has sent the email and therefore record it in the database. SendObject gives me this reporting capability, but I can't make it work.

SendObject Macro Action
You can use the SendObject action to include the specified Microsoft Office Access 2007 datasheet, form, report, module, or data access page in an electronic mail message, where it can be viewed and forwarded.

Command button to open email template
So I have a command button that I'd really like to be able to use to create an email message in outlook that pulls from a specific template and fills in the record information from the currently selected record.

I've looked around and the docmd.sendobject seems to be the closest thing, but it seems to attach the template rather than putting the text into the body of the paragraph. I am aware that you can put text in the docmd.sendobject function arguments, but I want the end user to be able to adjust what the message says without having to know access code and such.

Is there a way to use the send object function to pull from a specified template and place that text into the body of the message? Or is there a better way other than send object to do what I'm looking for?