?
Solved

Access Shell problem

Posted on 2013-06-06
4
Medium Priority
?
439 Views
Last Modified: 2013-06-07
I have a database that we have been using over the internal network for several years with no problems with a shell operation until IT has upgraded everyone to Adobe 11.0.

My code which has been working without fail until Adobe 11.0:

Private Sub Text196_DblClick(Cancel As Integer)
Dim x$
Dim stAppName As String

x$ = Text196.Value
Text415.Value = "C:\Program Files (x86)\Adobe\Reader 11.0\reader\AcroRd32.exe \\prnusemcfilsrv1\Runtime Data\ECO Database\ECODocuments\" + x$ + ".pdf"
stAppName = Text415.Value
Call Shell(stAppName, 1)

End Sub

The only thing changed is the path to where the Adobe 11.0 is located.  I have changed this over the years for every rev change to adobe with no problems until rev 11.

I get two different errors that I have attached the screenshots when code tries to run.

The first thing that comes up is attached "Capture.gif" and when you click "OK" you get the attached "Capture2.gif"

If I start Adobe on it's own and navigate to the documents manually they open fine.

Can anyone help with what is different about Adobe 11 that this will no longer work?

Thank you so very much in advance for any help.
Capture.GIF
Capture2.GIF
0
Comment
Question by:Blackbeltrrf
[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
  • 2
4 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39227135
Try:
Text415.Value = "C:\Program Files (x86)\Adobe\Reader 11.0\reader\AcroRd32.exe \prnusemcfilsrv1\Runtime Data\ECO Database\ECODocuments\" & x$ & ".pdf"

Open in new window

0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 1400 total points
ID: 39227149
Also you may want to Disable Protected Mode at Startup.

Either by adding the following reg key (manually or via vbs):
[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\11.0\Privileged]
"bProtectedMode"=dword:00000000

Open in new window


Or from the Reader's interface:

    1. Launch Adobe Acrobat Reader
    2. Go to: Edit > Preferences...
    3. Click on "General" (or “Advanced Security”  in version XI) in the left pane.
    4. Uncheck "Enable Protected Mode at startup"
    5. You will prompted with a dialog box to remind you to close the application for the change to go into effect. Click Yes.
    6. Click OK to save your change.
    7. Exit Adobe Reader
0
 
LVL 21
ID: 39227397
I have been using ShellExec for years with all version of Adobe since 3.0  without any issues. I also do not have to make any code changes when they change/or upgrade  or have a different PDF viewer. I have yet to change the VBA code since Acrobat 3 or to use a different viewer.

See: Start an app with ShellExecute
0
 

Author Closing Comment

by:Blackbeltrrf
ID: 39228747
TYVM! That works great!
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

752 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