Discussion Board for collaboration related to QlikView App Development.
I wrote a macro that puts an image on the background and prints the sheet.
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.
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….
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?
If is not possible there is other way to do that??
Thanks in advance for your answer
set temp = ActiveDocument.GetApplication.GetProperties
status = ActiveDocument.SetWallPaper("\\link\pippo.jpg", 1)
set docprop = ActiveDocument.GetProperties
docprop.UseBkgImage = true
rem ** set document for fit to page landscape sheet printing **
set docstampa = ActiveDocument.GetPropertiesset ps = docstampa.PrintSheetSettingsps.Landscape = trueps.PagesX = 1ps.PagesY = 1ps.PrintCurrentSelectionPosition = 4 'bottomps.UseScale = false 'fit to pageActiveDocument.SetProperties docstampa
docprop.UseBkgImage = false
Here is the code i found from API guide.
temp.UserPermissions.AllowPrintAnyway = false
At my side its not working properly. You can try your side.
The AllowPrintAnyway property in the API is read-only.
if AllowPrintAnyway is read only why this macro exist in API Guide?