Solved

Access Shell problem

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

719 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