<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: insert images excel in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7335667#M74518</link>
    <description>&lt;P&gt;Thank you very much.... !&lt;/P&gt;&lt;P&gt;Regards Martin&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2017 12:01:20 GMT</pubDate>
    <dc:creator>martinhoos</dc:creator>
    <dc:date>2017-08-29T12:01:20Z</dc:date>
    <item>
      <title>insert images excel</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7325439#M74423</link>
      <description>&lt;P&gt;Hello, i create a PDF file from a IDW and i create a excel file and insert the boom from the IDW. Is it possible, i dont know how, to insert the PDF file onto a new worksheet (sheet1)?&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;Regards Martin&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 11:41:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7325439#M74423</guid>
      <dc:creator>martinhoos</dc:creator>
      <dc:date>2017-08-24T11:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: insert images excel</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332509#M74482</link>
      <description>&lt;P&gt;You can refer to Excel API to do this, below is&amp;nbsp;sample code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 08:25:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332509#M74482</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2017-08-28T08:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: insert images excel</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332612#M74483</link>
      <description>&lt;P&gt;Hi Rocky,&lt;/P&gt;&lt;P&gt;thanks a lot for your reply. Is it possible to get your code as iLogic-code? So i can place it in better.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:14:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332612#M74483</guid>
      <dc:creator>martinhoos</dc:creator>
      <dc:date>2017-08-28T09:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: insert images excel</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332761#M74487</link>
      <description>&lt;P&gt;I am not sure how iLogic can reference to Excel API in iLogic rule, but below is a sample for you to call Excel API via Inventor VBA Editor, you can add the reference(Tools-&amp;gt;References...) to "Microsoft Excel xx.0 Object Library" in VBA Editor, the xx is the version of the Excel, and then in Inventor VBA run below macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub InsertPDFSample()
    Dim oExcel As Excel.Application

    On Error Resume Next
    Set oExcel = GetObject(, "excel.application")
    
    If Err.Number &amp;lt;&amp;gt; 0 Then
        Set oExcel = CreateObject("excel.application")
    End If
    
    oExcel.Visible = True
    
    Dim sExcelPath As String
    sExcelPath = "C:\TEMP\Test.xlsx"
    
    Dim oWorkbook As Excel.Workbook
    Set oWorkbook = oExcel.Workbooks.Open(sExcelPath)
    
    ' activate the first work sheet.
    oWorkbook.Sheets(1).Activate
    
    ' insert the PDF at the A1 cell
    oWorkbook.Sheets(1).Range("A1").Select

    ' insert as embedded object
    oWorkbook.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&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 10:42:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7332761#M74487</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2017-08-28T10:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: insert images excel</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7335667#M74518</link>
      <description>&lt;P&gt;Thank you very much.... !&lt;/P&gt;&lt;P&gt;Regards Martin&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 12:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/insert-images-excel/m-p/7335667#M74518</guid>
      <dc:creator>martinhoos</dc:creator>
      <dc:date>2017-08-29T12:01:20Z</dc:date>
    </item>
  </channel>
</rss>

