Solved

Access Shell problem

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How autopopulate number field with 2 different criteria 9 51
Track name AutoCorrect info 14 48
Is it possible to reset DSum? 12 44
Running Total in Access 4 19
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

867 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

20 Experts available now in Live!

Get 1:1 Help Now