<?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 macro with title/caption in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393806#M564320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, i have a macro to export a straight table to excel. sub expexcel set obj = ActiveDocument.GetSheetObject("CH07")&amp;nbsp; obj.SendToExcel&amp;nbsp;&amp;nbsp;&amp;nbsp; end Sub This exports to excel perfectly but the opened excel is with the name 'CH02_20130201_175054'&amp;nbsp; (chart object with timestamp) i want this name should be my chart object title(caption) or with chart object title_time stamp. and is it possible to do this without saving the file to a location? how can i achive this? Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2013 12:25:24 GMT</pubDate>
    <dc:creator>Siva_Sankar</dc:creator>
    <dc:date>2013-02-01T12:25:24Z</dc:date>
    <item>
      <title>macro with title/caption</title>
      <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393806#M564320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, i have a macro to export a straight table to excel. sub expexcel set obj = ActiveDocument.GetSheetObject("CH07")&amp;nbsp; obj.SendToExcel&amp;nbsp;&amp;nbsp;&amp;nbsp; end Sub This exports to excel perfectly but the opened excel is with the name 'CH02_20130201_175054'&amp;nbsp; (chart object with timestamp) i want this name should be my chart object title(caption) or with chart object title_time stamp. and is it possible to do this without saving the file to a location? how can i achive this? Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:25:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393806#M564320</guid>
      <dc:creator>Siva_Sankar</dc:creator>
      <dc:date>2013-02-01T12:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro with title/caption</title>
      <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393807#M564321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See &lt;A _jive_internal="true" href="https://community.qlik.com/thread/16718"&gt;here&lt;/A&gt; for a macro that exports to excel and renames the sheet name and saves with a specified file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;set obj = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;captiontext = obj.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;strSafeDate = DatePart("yyyy",Date()) &amp;amp; Right("0"&amp;nbsp; &amp;amp; DatePart("m",Date()), 2) &amp;amp; Right("0"&amp;nbsp; &amp;amp; DatePart("d",Date()), 2)&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;strSafeTime = Right("0" &amp;amp; Hour(Now()), 2) &amp;amp; Right("0" &amp;amp; Minute(Now()), 2) &amp;amp; Right("0" &amp;amp; Second(Now()), 2)&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;strDateTime = strSafeDate &amp;amp; strSafeTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;filename = captiontext &amp;amp; "_" &amp;amp; strDateTime&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393807#M564321</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-02-01T12:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: macro with title/caption</title>
      <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393808#M564322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But here i have to give the name for an excel file and save it. My need is it should open automatically as mentioned&amp;nbsp; my code mentioned above does. the only need is it uses a object id with date format. i want to have my title caption used in the chart object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393808#M564322</guid>
      <dc:creator>Siva_Sankar</dc:creator>
      <dc:date>2013-02-01T12:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: macro with title/caption</title>
      <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393809#M564323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, any help? just need the caption and title to be arrived in excel using the macro. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 14:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393809#M564323</guid>
      <dc:creator>Siva_Sankar</dc:creator>
      <dc:date>2013-02-01T14:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: macro with title/caption</title>
      <link>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393810#M564324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey I actually had the same issue and Gysbert pointed me here.&amp;nbsp; I ultimately figured out that you need to go to the chart/table object properties and change the object id itself to what you want.&amp;nbsp; The object ID field is next to the title field on the general tab and has CH01 or TB01 etc.&amp;nbsp; You can change that CH01 to Email List Report or whatever you want, but it treats everything as pure text so you'd have to append other things like date to it in the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---excerpt from thread I posted---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Step 1: go to chart or table properties general tab and change Object ID to match caption or give whatever text you want it to give. e.g. Email List of Active Users&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Then Step 2: use this script and make the part in “” on set obj match the object id you gave the object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;sub ExportEmailButton&lt;BR /&gt; set obj = ActiveDocument.GetSheetObject("Email List of Active Users") &amp;lt;-match this to your object id&lt;BR /&gt; captiontext = obj.GetCaption.Name.v&lt;BR /&gt; strSafeDate = DatePart("yyyy",Date()) &amp;amp; Right("0" &amp;amp; DatePart("m",Date()), 2) &amp;amp; Right("0"&amp;nbsp; &amp;amp; DatePart("d",Date()), 2)&lt;BR /&gt; strSafeTime = Right("0" &amp;amp; Hour(Now()), 2) &amp;amp; Right("0" &amp;amp; Minute(Now()), 2) &amp;amp; Right("0" &amp;amp; Second(Now()), 2)&lt;BR /&gt; strDateTime = strSafeDate &amp;amp; strSafeTime&lt;BR /&gt; filename = captiontext&amp;amp;"_"&amp;amp;strDateTime&lt;BR /&gt; obj.SendToExcel&lt;BR /&gt; end Sub &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result is a file opens in Excel with file name: Email List of Active Users_20130703_122730&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably okay to add an &amp;amp;.xlsx or &amp;amp;.xls to the end of the filename if you have such a need.&amp;nbsp; (I saw someone else with that need.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Other thing that seems to be needed is to match the first line sub name to the button name and macro name.&amp;nbsp; I had difficulty making the macro work outside the test mode until I synchronized the sub, macro name, and button label.&amp;nbsp; Then they worked when I pushed the button object as well as when I pushed test.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Other comments:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;--I couldn’t get a dynamic caption formula to work in the object id script.&amp;nbsp; I originally had =ClientAccountName&amp;amp;’ Email List of Active Users’ but had to drop the =ClientAccountName&amp;amp; part.&amp;nbsp; I will explore other methods for that later.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;--The one I originally posted saved to a particular folder and I suspect I could stick that filepath code in above, but I actually like opening it first since I have to rerun the script and save to a multitude of folders for the actual task I was working on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;--I could make a script for each client folder and one-up that by tracking down the email hyperlink vb script, but happy to get the job done for now. &lt;/SPAN&gt;J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Thanks Gysbert for the getcaption syntax that pulls the object id for whatever reason.&amp;nbsp; I was able to fudge the object id to something helpful at least. &lt;/SPAN&gt;J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;-Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 17:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-with-title-caption/m-p/393810#M564324</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2013-07-03T17:03:46Z</dc:date>
    </item>
  </channel>
</rss>

