# Win32OLE and PDF

**URL:** <https://www.ruby-forum.com/t/win32ole-and-pdf/81320>\
**Category:** Ruby\
**Created:** [January 7, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/win32ole-and-pdf/81320 "2007-01-07T18:14:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yelatia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@yelatia](https://www.ruby-forum.com/u/yelatia)\
**Post date:** [January 7, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/win32ole-and-pdf/81320/1 "2007-01-07T18:14:21Z")

</div>

Does anyone know how to use Win32OLE to connect to an opened pdf  
document ?

I tried this acrobat

```
require "win32ole"
WIN32OLE.new('AcroExch.App')

```

but I got this error :

pdfEbook.rb:12:in `initialize': unknown OLE server:`AcroExch.App’  
(WIN32OLERuntimeError)  
HRESULT error code:0x800401f3  
Invalid class string from

Any help is appreciated…

Thanks

---

<div class="post-metadata">

**Author:** ![yelatia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@yelatia](https://www.ruby-forum.com/u/yelatia)\
**Post date:** [January 7, 2007, 6:29pm UTC](https://www.ruby-forum.com/t/win32ole-and-pdf/81320/2 "2007-01-07T18:29:50Z")

</div>

On 1/7/07, Youssef Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> pdfEbook.rb:12:in `initialize': unknown OLE server: `AcroExch.App’  
> (WIN32OLERuntimeError)  
> HRESULT error code:0x800401f3  
> Invalid class string from
> 
> Any help is appreciated…
> 
> Thanks

Though I don’t know the exact app name, try this:

1. there was a thread on starting acrobat through ole (the poster used  
the same ID) maybe you can tyr his code - search for acrobat in the  
archives

2. look for a thread named ‘Ruby and COM’ - somebody explains how to  
find out what is the exact app name

---

<div class="post-metadata">

**Author:** ![yelatia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@yelatia](https://www.ruby-forum.com/u/yelatia)\
**Post date:** [January 7, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/win32ole-and-pdf/81320/3 "2007-01-07T20:50:47Z")

</div>

Jan S. wrote:

> On 1/7/07, Youssef Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > pdfEbook.rb:12:in `initialize': unknown OLE server: `AcroExch.App’  
> > (WIN32OLERuntimeError)  
> > HRESULT error code:0x800401f3  
> > Invalid class string from
> > 
> > Any help is appreciated…
> > 
> > Thanks
> 
> Though I don’t know the exact app name, try this:
> 
> 1. there was a thread on starting acrobat through ole (the poster used  
> the same ID) maybe you can tyr his code - search for acrobat in the  
> archives
> 
> 2. look for a thread named ‘Ruby and COM’ - somebody explains how to  
> find out what is the exact app name

Thanks Jan,  
I found the thread: [Ruby and COM - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/88013#166809)

I’m reading it now
