Re: How to load a PDF using Excel VBA

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bill Renaud (BNoSpamRenaud_at_Houston.rr.com)
Date: 04/20/04


Date: Tue, 20 Apr 2004 05:39:06 GMT

I could not get this to work until I included the full path and name of the
Adobe Acrobat reader in the command along with the desired file name.
Apparently, Shell passes the whole string directly to the command engine
without looking up the association in the registry. This could be a problem
if you are going to try to run this on a variety of machines, since the
Adobe Reader may be in different subdirectories on every machine.

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe C:\My
Documents\Test Page.pdf", _
  vbNormalFocus

(You can replace the vbNormalFocus with vbMaximizedFocus or whatever value
you want for the window style.)

-- 
Regards,
Bill
"James" <anonymous@discussions.microsoft.com> wrote in message
news:9CE36DE4-5C6F-4208-8ECA-DE3A3F697EC9@microsoft.com...
> I tried before I submit the question. Failed.
>
> But thanks anyway. :>
>
>      ----- Dave Peterson wrote: -----
>
>      Ahhh.
>
>      maybe something like:
>
>      Shell "start myfile.pdf"
>
>      James wrote:
>      >> I want to open the PDF in Acrobat Reader, not importing it into
Excel. But use Excel VBA.
>      >>>      ----- Dave Peterson wrote: -----
>      >>      You could search google for pdf translators (to excel or to
text files).  Most
>      >      are commercial ($).
>      >>      You might get lucky and be able to copy each column and paste
into excel (column
>      >      by column)--from Adobe Reader.
>      >>>>      James wrote:
>      >>> I mean, I got a PDF file. I want to use Excel VBA to open that
PDF in Acrobat Reader. Just like when you double-click a PDF using the
mouse.
>      >>      --
>      >>      Dave Peterson
>      >      ec35720@msn.com
>      >
>
>      -- 
>
>      Dave Peterson
>      ec35720@msn.com
>


Relevant Pages

  • Re: Windows XP Service Pack 2
    ... With regards to the antivirus warning: You can double-click on the "warning ... The easiest way I know to correct this is to uninstall the Adobe ... If you are already running the latest version of the adobe acrobat reader ... Make sure the checkboxes for "Display PDF in browser" and "Check Browser ...
    (microsoft.public.windowsxp.general)
  • Re: Question on a COM project.
    ... Excel or Word menu bar (after installation like PDF Write or Adobe ... The server side operation will be handled by calling a CGI file ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Hyperlink: Linking problem when link to file
    ... same level as the PDF that I am having trouble with) I tried placing the PDF ... Try puttting a link to an excel file in the same directory as see if it ... opens. ... The shortcut link to adobe is not correct. ...
    (microsoft.public.excel.misc)
  • [Full-Disclosure] Re: Adobe acrobat / Adobe Reader 6 can read local files
    ... I have Acrobat Reader configured to NOT run Javascript. ... embedded SWF exploit to work? ... > Acrobat/ Acrobat reader is software for viewing and printing Adobe Portable ... Adobe PDF files can be viewed on most major ...
    (Full-Disclosure)
  • RE: Hyperlink: Linking problem when link to file
    ... There is a known issue with Adobe Reader 7.0 that causes PDF files to not be ... Try puttting a link to an excel file in the same directory as see if it ... opens. ...
    (microsoft.public.excel.misc)