<?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 manage document properties with macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283768#M105483</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Here is the code i found from API guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp=ActiveDocument.GetProperties&lt;/P&gt;&lt;P&gt;temp.UserPermissions.AllowPrintAnyway = false&lt;/P&gt;&lt;P&gt;ActiveDocument.SetProperties temp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; At my side its not working properly. You can try your side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jul 2011 12:36:06 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2011-07-15T12:36:06Z</dc:date>
    <item>
      <title>manage document properties with macro</title>
      <link>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283767#M105482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a macro that puts an image on the background and prints the sheet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have to prohibit the print by file menu (Print File, Print PDF ecc) so the only way to print for the users will be the button with the macro.&lt;/P&gt;&lt;P&gt;I know that in the “setting” menu, you can manage by “document properties”, by flag “allows printing (when export is prohibited)”, but if I disable flag the macro doesn’t works….&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is: is possible to manage this flag inside the macro, so I can put this flag, run the other script of the macro, and then disable the flag?&lt;/P&gt;&lt;P&gt;If is not possible there is other way to do that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MACRO CODE:&lt;/P&gt;&lt;P&gt;sub WP&lt;/P&gt;&lt;P&gt;set temp = ActiveDocument.GetApplication.GetProperties&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;status = ActiveDocument.SetWallPaper("&lt;A href="https://community.qlik.com/"&gt;\\link\pippo.jpg&lt;/A&gt;", 1)&lt;/P&gt;&lt;P&gt;set docprop = ActiveDocument.GetProperties &lt;/P&gt;&lt;P&gt;docprop.UseBkgImage = true&lt;/P&gt;&lt;P&gt;ActiveDocument.SetProperties docprop&lt;/P&gt;&lt;P&gt;rem ** set document for fit to page landscape sheet printing **&lt;/P&gt;&lt;P&gt;set docstampa = ActiveDocument.GetProperties&lt;BR /&gt;set ps = docstampa.PrintSheetSettings&lt;BR /&gt;ps.Landscape = true&lt;BR /&gt;ps.PagesX = 1&lt;BR /&gt;ps.PagesY = 1&lt;BR /&gt;ps.PrintCurrentSelectionPosition = 4&amp;nbsp;&amp;nbsp; 'bottom&lt;BR /&gt;ps.UseScale = false&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'fit to page&lt;BR /&gt;ActiveDocument.SetProperties docstampa&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;set s=ActiveDocument.ActiveSheet&lt;/P&gt;&lt;P&gt;s.Print true&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;docprop.UseBkgImage = false&lt;/P&gt;&lt;P&gt;ActiveDocument.SetProperties docprop&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 12:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283767#M105482</guid>
      <dc:creator />
      <dc:date>2011-07-15T12:28:01Z</dc:date>
    </item>
    <item>
      <title>manage document properties with macro</title>
      <link>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283768#M105483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Here is the code i found from API guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp=ActiveDocument.GetProperties&lt;/P&gt;&lt;P&gt;temp.UserPermissions.AllowPrintAnyway = false&lt;/P&gt;&lt;P&gt;ActiveDocument.SetProperties temp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; At my side its not working properly. You can try your side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 12:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283768#M105483</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-07-15T12:36:06Z</dc:date>
    </item>
    <item>
      <title>manage document properties with macro</title>
      <link>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283769#M105484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The AllowPrintAnyway property in the API is read-only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 20:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283769#M105484</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-07-15T20:29:58Z</dc:date>
    </item>
    <item>
      <title>manage document properties with macro</title>
      <link>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283770#M105485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if AllowPrintAnyway is read only why this macro exist in API Guide?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;temp=ActiveDocument.GetProperties&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;temp.UserPermissions.AllowPrintAnyway = false&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;ActiveDocument.SetProperties temp&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 12:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/manage-document-properties-with-macro/m-p/283770#M105485</guid>
      <dc:creator>jafari_ervin</dc:creator>
      <dc:date>2012-05-22T12:08:03Z</dc:date>
    </item>
  </channel>
</rss>

