PDA

View Full Version : Embed PDF File in Word Document



Mavila
09-02-2020, 11:36 AM
I'm trying to embed a pdf file in a Word document using the VBA equivalent of INSERT > OBJECT > ADOBE ACROBAT DOCUMENT, etc.

My code is this:

Selection.InlineShapes.AddOLEObject ClassType:="Acrobat.Document.DC", _
FileName:="strFullPath & fileNm", LinkToFile:=False, DisplayAsIcon:=False

I'm getting error #4198.

I'm not sure what I can do to fix this.

Also, I don't know if there's an alternative to embedding as an InlineShapes?

Thanks.

Mavila
09-02-2020, 12:24 PM
Foolish me! Used quotes marks around variables (recorder, ugh!).