OLE from Excel to OLE to Word

Bhuwan

New Member
Joined
Nov 11, 2014
Messages
1
I have an excel file which I use to create Word documents.
I am able to copy data, table, images.
However I have a PDF file in my excel file(which I have inserted using Insert option). I want that to Insert in the word document that I create.
Currently I am trying to use the following Code for this, BUT GETTING Error 4198 while executing. Could someone help please.

Code:
oDoc.Shapes.AddOLEObject ClassType:="AcroExch.Document.11", _
                                        Filename:= _
                                        ThisWorkbook.Worksheets("ABCD").OLEObjects("AAAA") _
                                        , LinkToFile:=False, DisplayAsIcon:=True, IconFileName:= _
                                        "C:\Windows\Installer\{AC76BA86-7AD7-1033-7B44-AB0000000001}\PDFFile_8.ico" _
                                        , IconIndex:=0, IconLabel:= _
                                        "AAAA"
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top