Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
markmccoid
Partner - Creator II
Partner - Creator II

Bookmark macro doesn't apply before export occurs.

I have the following Macro where I'm trying to load a bookmark and then call another function that loops through a field, exporting XLS files.

sub ExportDriver
ActiveDocument.RecallDocBookmark "Test2"
call AML_PrintToExcel("vExportLocation", "ExportChart", "AccountNumber_AdBase")
end sub

The problem is that the export finishes before the bookmark is applied, hence I get more information than I want.
It works fine on small datasets, but when it gets larger, I get the situation where the information is exported before the bookmark applies.
Has anyone experienced this or better yet, found a solution?


Labels (1)
1 Reply
pover
Partner - Master
Partner - Master

After recalling the bookmark inset the following line so that the macro waits for the bookmark to be applied.

ActiveDocument.GetApplication.WaitForIdle

Regards.