Breni
06-25-2020, 04:46 AM
Hello!
I've successfully been using the following code to embed PDFs into a Word document.
' Embed File Inline
Application.Selection.InlineShapes.AddOLEObject _
FileName:=FiletoInsert, _
LinkToFile:=False, _
DisplayAsIcon:=True, _
IconLabel:=Right(FiletoInsert, Len(FiletoInsert) - InStrRev(FiletoInsert, "\")), _
Range:=Application.Selection.Range.Next(Unit:=wdCell, Count:=1)
But when users without my systems chosen default PDF reader app try to open the file everything falls down, the file won't open.
Can I set a generic PDF class type that then uses the system default PDF reader?
I found a website (can't seem to link to it) that indicates that I may be able to embed as a package, but I can't work out or find how to do this programatically in VBA. (And I don't want to have to do this mandraulically every time)
Any help to resolve the issue would be greatly appreciated!
I'm using Word from Office 365. (Version 1908)
I've successfully been using the following code to embed PDFs into a Word document.
' Embed File Inline
Application.Selection.InlineShapes.AddOLEObject _
FileName:=FiletoInsert, _
LinkToFile:=False, _
DisplayAsIcon:=True, _
IconLabel:=Right(FiletoInsert, Len(FiletoInsert) - InStrRev(FiletoInsert, "\")), _
Range:=Application.Selection.Range.Next(Unit:=wdCell, Count:=1)
But when users without my systems chosen default PDF reader app try to open the file everything falls down, the file won't open.
Can I set a generic PDF class type that then uses the system default PDF reader?
I found a website (can't seem to link to it) that indicates that I may be able to embed as a package, but I can't work out or find how to do this programatically in VBA. (And I don't want to have to do this mandraulically every time)
Any help to resolve the issue would be greatly appreciated!
I'm using Word from Office 365. (Version 1908)