Access 2007-2013
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 
NEW Release: Access Advanced Level 2    dismiss

News      User Comments     History     Notify Me

11/25/2014 7:58:29 AM
New Access Tip: Shell Function
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

 
In this Microsoft Access tip I'm going to show you how to use the SHELL function to open external programs (like Word, Excel, Acrobat, etc.) and load up files (documents, sheets, PDFs, etc.) to display.

TIP: MICROSOFT ACCESS SHELL FUNCTION

I cover this topic in a lot more depth in my new Microsoft Access Open Other Programs Seminar.

Permanent Link
Keywords: access tips
Post Reply

New Access Tip Shell Function Comment from Marc S @ 12/17/2014
BINGO that was is it not the full path. Thank you, seasons greetings.


Reply from Alex Hedley:

Glad you got it working :)
Show Just This Thread        Post Reply
New Access Tip Shell Function Comment from Marc S @ 12/16/2014
When I try shell function with acroRD32.exe I keep getting "Microsoft Visual Basic-Run-time error 53-File not found" error.  I can get shell to work with notepad.exe but not with adobe. Sounds like a missing dll according to a quick internet search but which one.
Any ideas or leads on fixing this error ?
Otherwise this shell thing would be great if it worked for me.
Thank you
M


Reply from Alex Hedley:

Are you quoting the full path of where Adobe is? If there are spaces it can have trouble.
Show Just This Thread        Post Reply
New Access Tip Shell Function Comment from Marc S @ 12/4/2014
Hello,
I have two related questions.

1. Is there a way to tell the external program to open to a specified page in the document. (I would like Adobe to open a pdf to page x)

2. Is there a way to send an external file (pdf) directly to the printer AND  have the number of copies match a number field from access ? (for example print 28 copies of this worksheet with 28 being the number of students in a class)

Good stuff Richard.
Marc


Reply from Richard Rost:

1. It depends on the program. Adobe Acrobat WILL accept a command-line parameter for the page number following the /A switch. I believe it's something like

ACRORD32.EXE MyFile.PDF /A PAGE=7

That should open MyFile.PDF to page 7. See this document for details.

2. You can send direct to the default printer very easily. Just use the NORMAL option instead of the PREVIEW option when opening a report. The number of copies could be controlled with a FOR NEXT loop in your button's VBA code. So the answer to your question is "yes, with a little programming."

Show Just This Thread        Post Reply

Add Your Comments or Subscribe
 
If you just want to subscribe to get email updates when the News is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
 
  Your Name:  Required
  Your Email:  NOT Public
  Subject:
  Comments:

 

Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 9+3:
  
  Notify me when the News is updated.
  Remember Me for my next comments
  
 
 
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard

 

 

You may want to read these articles from the 599CD News:

1/17/2017Microsoft Access Advanced 2
12/7/2016Access Advanced 2 is Finished
9/20/2016Microsoft Access Advanced 1
9/17/2016Access Advanced 1 is Finished
6/11/2016Microsoft Access Expert 32
6/9/2016New Access Class Finished
3/9/2016Microsoft Access Expert 31
8/16/2015Access Registration Seminar
8/2/2015Microsoft Access Expert 30
8/1/2015Access Loan Calculator
 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP