Solved

Access Shell problem

Posted on 2013-06-06
4
393 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
  • 2
4 Comments
 
LVL 26

Expert Comment

by:MacroShadow
Comment Utility
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 26

Accepted Solution

by:
MacroShadow earned 350 total points
Comment Utility
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
Comment Utility
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
Comment Utility
TYVM! That works great!
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now