<?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 GetObjectId in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141377#M21075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Brian&lt;/P&gt;&lt;P&gt;I put together the following quick macro that worked for me in terms of providing all objects, with their ID's, so I'm sure you can incorporate it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;SUB Objects&lt;BR /&gt; Shtobj = ActiveDocument.ActiveSheet.GetSheetObjects&lt;BR /&gt; for i = lBound(Shtobj) to uBound(Shtobj)&lt;BR /&gt; msgbox(Shtobj(i).GetObjectId)&lt;BR /&gt; msgbox(Shtobj(i).IsMinimized)&lt;BR /&gt; next&lt;BR /&gt;END SUB&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;' FURTHER INFO&lt;BR /&gt;' YOU MIGHT WANT TO WRAP THE FOLLOWING IF STATEMENT INTO THE ROUTINE ABOVE (IT DEALS WITH PIVOTS)&lt;BR /&gt;' If Shtobj(i).GetObjectType = 10 Then 'pivot tables&lt;BR /&gt;' set Pivot = Shtobj(i)&lt;BR /&gt;' set y = Pivot.GetProperties&lt;BR /&gt;' etc, etc&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope it helps you out.&lt;/P&gt;&lt;P&gt;Nigel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 23:42:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-04-15T23:42:42Z</dc:date>
    <item>
      <title>GetObjectId</title>
      <link>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141376#M21074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a sheet with several pivot charts that are all set to auto-minimze so that only one is open at a time. I have a macro that creates an Outlook message and attaches an Excel file of the currently open pivot. But right now I am doing this by hard-coding the object ID. What I'd like the macro to do is loop through all the pivot chart objects on the sheet, determine which one is open (not IsMinimized) and grab its ObjectID. That way the macro won't need to have Object ID hard-coded and it will work for whichever pivot is open. But I'm having troubl getting this part to work. Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 22:07:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141376#M21074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-15T22:07:49Z</dc:date>
    </item>
    <item>
      <title>GetObjectId</title>
      <link>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141377#M21075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Brian&lt;/P&gt;&lt;P&gt;I put together the following quick macro that worked for me in terms of providing all objects, with their ID's, so I'm sure you can incorporate it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;SUB Objects&lt;BR /&gt; Shtobj = ActiveDocument.ActiveSheet.GetSheetObjects&lt;BR /&gt; for i = lBound(Shtobj) to uBound(Shtobj)&lt;BR /&gt; msgbox(Shtobj(i).GetObjectId)&lt;BR /&gt; msgbox(Shtobj(i).IsMinimized)&lt;BR /&gt; next&lt;BR /&gt;END SUB&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;' FURTHER INFO&lt;BR /&gt;' YOU MIGHT WANT TO WRAP THE FOLLOWING IF STATEMENT INTO THE ROUTINE ABOVE (IT DEALS WITH PIVOTS)&lt;BR /&gt;' If Shtobj(i).GetObjectType = 10 Then 'pivot tables&lt;BR /&gt;' set Pivot = Shtobj(i)&lt;BR /&gt;' set y = Pivot.GetProperties&lt;BR /&gt;' etc, etc&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope it helps you out.&lt;/P&gt;&lt;P&gt;Nigel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 23:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141377#M21075</guid>
      <dc:creator />
      <dc:date>2009-04-15T23:42:42Z</dc:date>
    </item>
    <item>
      <title>GetObjectId</title>
      <link>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141378#M21076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, thanks!&lt;/P&gt;&lt;P&gt;Here is my final macro if anyone is interested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;SUB SendFile' identify the open pivotShtobj = ActiveDocument.ActiveSheet.GetSheetObjectsfor i = lBound(Shtobj) to uBound(Shtobj) If Shtobj(i).GetObjectType = 10 Then set Pivot = Shtobj(i) If not Shtobj(i).IsMinimized Then vCurrentPivotID = (mid(Shtobj(i).GetObjectId,10)) vCurrentPivotName = Shtobj(i).GetCaption.Name.v end if end ifnext 'Create Fileset obj = ActiveDocument.GetSheetObject(vCurrentPivotID)vFilename = "C:\" &amp;amp; vCurrentPivotName &amp;amp; ".xls"obj.ExportBiff vFilename'Open a new Outlook e-mail form and pre-populate.'The user can further customize the e-mail before sending.vBody="Please review the attached file." &amp;amp; vbCrLfSet vOlApp = CreateObject("Outlook.Application")Set vMessage = vOlApp.CreateItem(olMailItem) vMessage.Subject = "QlikView Data Question" vMessage.To = "" vMessage.Body = vBody &amp;amp; vbCrLfvMessage.Attachments.Add (vFilename)vMessage.DisplayEND SUB&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 02:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141378#M21076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-16T02:30:18Z</dc:date>
    </item>
    <item>
      <title>GetObjectId</title>
      <link>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141379#M21077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also have the IsActive function, but if you click on a button to run the macro that button will be the activated object...&lt;/P&gt;&lt;P&gt;I solved this by assigning the macro to onToolbarMacro1 (yiou can add macros to 3 buttons in the toolbar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 05:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetObjectId/m-p/141379#M21077</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2009-04-16T05:30:20Z</dc:date>
    </item>
  </channel>
</rss>

