Solved

MS Access 2010 SendObject using .pdf Format for Report

Posted on 2012-03-15
7
931 Views
Last Modified: 2012-03-28
I am using MS Access 2010.  I converted a database from 2003 to 2010.  There is a print preview report that appears and a button added to the Add-Ins tab of the ribbon for the SendObject macro to email the report but it doesn't work.  It was set to mail a snapshot so I changed it to .pdf instead.  When I click the button the window appears stating one page of the report has been created but it hangs up here.  It never opens Outlook 2010 to attach the report.

Thinking that everything I needed may not have been installed I tried to save and publish this same report as a .pdf and that worked fine so I'm thinking I have everything I need to do this.  I found a lot of information, some for add-ins in 2007 that are needed and other information stating that .pdf is built in and nothing is needed.  Can someone please shed some light on why this won't work?

Also, I know you can do this with VBA but I am not a programmer so I prefer to go the route of the macro first.  Thanks in advance for your help.
0
Comment
Question by:avlna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:als315
ID: 37726127
In Access 2010 you have Send button on Export Ribbon. Have you tested it?
Code for your button should be like this:
DoCmd.SendObject acSendReport, Screen.ActiveReport.Name, acFormatPDF
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37726623
<No Points wanted>

It is not clear if this custom button even worked...?
...or how it was created/coded,...?
.......or how you modified it ...?
.....or how, or if the email address get populated...
...etc

To be safe, I try to put any custom functionality on a form.
So I would use code like als315 posted, but on a button on a form.

Get something simple like this working *First*, ...then worry about putting it on a Ribbon later.

;-)

JeffCoachman
0
 

Author Comment

by:avlna
ID: 37728922
This was created in Access 2003 and it worked until it was converted to 2010.  The problem is that I can no longer use the snapshot because it doesn't exist in 2010 so I needed to change it to a .pdf and now it hangs up.

als315 - As I stated I'm not a programmer so I don't even know what to do with your code.

boag2000 - Yes, it worked in 2003 but not after converting to 2010.  That is why I changed the .snp to .pdf.

It was created so when it's clicked a macro runs using SendObject.

I modified it by opening the macro in design view and changing the Output Format from .snp to .pdf.  (see attached)

The email field doesn't get populated.  It's an optional field and the person sending the report will fill in the To: field once the email opens.

This is a report, not a form and the report is generated after the data is entered.  It is not necessary to close the form and then generate a report to send it.

I didn't attach it to the ribbon that happened when it was converted.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37729285
Then again, I would simply ignore/disable this in the ribbon and do it from a form/report with code similar to what the first Expert posted.

Again, unless you want to get involved in customizing ribbons, I would just do this directly in code.
0
 

Accepted Solution

by:
avlna earned 0 total points
ID: 37729666
Customizing ribbons, like toolbars, is very easy and Access has an option for it.

This turned out not to be an Access issue but anOutlook issue.  Access did still need the .snp to be changed to a .pdf but once Outlook was reinstalled no other changes needed to be made and it worked fine.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37730421
<Customizing ribbons, like toolbars, is very easy and Access has an option for it.>
Customizing ribbons is still a long way from being "Easy" for most new Access developers...
...As is evidenced by the hundreds of question here on how to do this...

I'm glad you got your issue sorted..

;-)

Jeff
0
 

Author Closing Comment

by:avlna
ID: 37775693
I accepted my own because that resolved the problem and also because when I tried to delete the questions the instructions from Expert Exchange said to do that.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question