Solved

Access Shell problem

Posted on 2013-06-06
4
414 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 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 350 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

813 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

10 Experts available now in Live!

Get 1:1 Help Now