ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Identifying version of Adobe Reader (https://www.excelbanter.com/excel-programming/339984-identifying-version-adobe-reader.html)

Andrew

Identifying version of Adobe Reader
 
Hi,

I have written some code that will open a pdf file using the following code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found which
worked until I found a version 6.0 CE. I got around this but putting the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an easier
way???

I am also lead to believe you don't need to put the version in but I haven't
been able to get to work.

Any ideas?





--
Andrew

Zoo

Identifying version of Adobe Reader
 
Something like this?

Version =
createobject("wscript.shell").regread("HKCR\AcroEx ch.App\AcrobatVersion\")


"Andrew" wrote in message
...
Hi,

I have written some code that will open a pdf file using the following

code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe

folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found which
worked until I found a version 6.0 CE. I got around this but putting the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an

easier
way???

I am also lead to believe you don't need to put the version in but I

haven't
been able to get to work.

Any ideas?





--
Andrew



Andrew

Identifying version of Adobe Reader
 
Hi Zoo,

Thanks for helping but I get the following error (I have no idea what this
means...)

Run-time error '-2147024894 (80070002)':

Invalid root in registry key 'HKCR\AcroExch.App\AcrobatVersion\".



--
Andrew


"Zoo" wrote:

Something like this?

Version =
createobject("wscript.shell").regread("HKCR\AcroEx ch.App\AcrobatVersion\")


"Andrew" wrote in message
...
Hi,

I have written some code that will open a pdf file using the following

code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe

folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found which
worked until I found a version 6.0 CE. I got around this but putting the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an

easier
way???

I am also lead to believe you don't need to put the version in but I

haven't
been able to get to work.

Any ideas?





--
Andrew




Zoo

Identifying version of Adobe Reader
 
How about this?
createobject("wscript.shell").regread("HKCR\AcroEx ch.Document\AcrobatVersion
\")

"Andrew" wrote in message
...
Hi Zoo,

Thanks for helping but I get the following error (I have no idea what this
means...)

Run-time error '-2147024894 (80070002)':

Invalid root in registry key 'HKCR\AcroExch.App\AcrobatVersion\".



--
Andrew


"Zoo" wrote:

Something like this?

Version =

createobject("wscript.shell").regread("HKCR\AcroEx ch.App\AcrobatVersion\")


"Andrew" wrote in message
...
Hi,

I have written some code that will open a pdf file using the following

code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I

found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe

folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found

which
worked until I found a version 6.0 CE. I got around this but putting

the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an

easier
way???

I am also lead to believe you don't need to put the version in but I

haven't
been able to get to work.

Any ideas?





--
Andrew





Andrew

Identifying version of Adobe Reader
 
Bingo!!

Thanks mate

--
Andrew


"Zoo" wrote:

How about this?
createobject("wscript.shell").regread("HKCR\AcroEx ch.Document\AcrobatVersion
\")

"Andrew" wrote in message
...
Hi Zoo,

Thanks for helping but I get the following error (I have no idea what this
means...)

Run-time error '-2147024894 (80070002)':

Invalid root in registry key 'HKCR\AcroExch.App\AcrobatVersion\".



--
Andrew


"Zoo" wrote:

Something like this?

Version =

createobject("wscript.shell").regread("HKCR\AcroEx ch.App\AcrobatVersion\")


"Andrew" wrote in message
...
Hi,

I have written some code that will open a pdf file using the following
code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I

found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe
folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found

which
worked until I found a version 6.0 CE. I got around this but putting

the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an
easier
way???

I am also lead to believe you don't need to put the version in but I
haven't
been able to get to work.

Any ideas?





--
Andrew





Zoo

Identifying version of Adobe Reader
 
This site may help you.(But the site is for Delphi)

http://www.vincenzo.net/isxkb/module...article&sid=73

"Andrew" wrote in message
...
Hi Zoo,

Thanks for helping but I get the following error (I have no idea what this
means...)

Run-time error '-2147024894 (80070002)':

Invalid root in registry key 'HKCR\AcroExch.App\AcrobatVersion\".



--
Andrew


"Zoo" wrote:

Something like this?

Version =

createobject("wscript.shell").regread("HKCR\AcroEx ch.App\AcrobatVersion\")


"Andrew" wrote in message
...
Hi,

I have written some code that will open a pdf file using the following

code:

Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
File_To_Open1, vbNormalFocus

This works fine if the user has the same version as me (5.0) but I

found
that many users in this company have different versions.

Can I get the version from the Registry (and if so how)?

I also thought about looking at my directories and finding the Adobe

folder
but thought this is an untidy method..

I got around this by capturing the error if 5.0 couldn't be found

which
worked until I found a version 6.0 CE. I got around this but putting

the
following code in:

If The_Ver = "6.0" Then The_Ver = "6.0 CE"

I don't want to keep having to create these get-arounds. Is there an

easier
way???

I am also lead to believe you don't need to put the version in but I

haven't
been able to get to work.

Any ideas?





--
Andrew






All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com