Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
YuhanZhang
in reply to: martinhoos

You can refer to Excel API to do this, below is sample code:

 

Sub ExcelInsertPDFMacroSample()
 
    Dim oWB As Workbook
    Set oWB = Application.ActiveWorkbook
    
    ' activate the first work sheet.
    oWB.Sheets(1).Activate
    
    ' insert the PDF at the A1 cell
    Range("A1").Select

    ' insert as embedded object
    ActiveSheet.OLEObjects.Add(Filename:="C:\Temp\MyPDF.pdf" _
        , Link:=False, DisplayAsIcon:=False).Select
    
    ' insert as linked object
    'ActiveSheet.OLEObjects.Add(Filename:="C:\Temp\MyPDF.pdf" _
        , Link:=True, DisplayAsIcon:=False).Select
End Sub


If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.