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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create Bookmark using Macro

Hi

In my QVW file i need to create a BookMark with  ID="BM01" in macro

I tried like below step, but it is creating an error.

ActiveDocument.CreateUserBookmark.BookmarkId ="BM01"

Please can anyone provide solution regarding this post.

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Can you try the following:

sub CreateBookMark

     ActiveDocument.CreateUserBookmark "BM01"

end sub

Kiran.

View solution in original post

7 Replies
Not applicable
Author

I have the same problem . . .

Not applicable
Author

Can you try the following:

sub CreateBookMark

     ActiveDocument.CreateUserBookmark "BM01"

end sub

Kiran.

Not applicable
Author

and for envaluate  it?

I want that BM01 select a specific date . . . How can I do?

Not applicable
Author

sub CreateBookMark

     ActiveDocument.Fields("DocumentDate").Select "11/02/2011"

     ActiveDocument.CreateUserBookmark "BM01"

     ActiveDocument.Fields("DocumentDate").Clear

end sub

PS: When bookmark is created all selections in the document at that point will be bookmarked. So make sure before you run the bookmark clear the current selections (unlock if needed).

Regards,

Kiran.

Not applicable
Author

Thank you very much Kiran, now I'll try.

Not applicable
Author

Is there a possibility to include the input field values in this macro-created bookmark?

-Yes there is, from API guide the parameters are as follows:

CreatUserBookmark <BookmarkName>, <Layout state included>, <Applied top of current selections>, <Pop-up message>, <Bookmark info>, <Selections excluded>, <Input field values are included>

hugo_andrade
Partner - Specialist
Partner - Specialist

Henry,

Is there a way to do it:

CreateDocumentBookmark (shared woth other users),
Label Bookmark using the available/selected "PracticeID" (field),
I want to apply only the PracticeID selection and clear all the other selections,

And I need to incorporate the input fields.

Plus:

If a bookmark is already created and labeled with the specific "PracticeID", replace the bookmark with the new values and don't create another one with the same label.

Plus 2: set bookmarks as hidden.

Thank you.

Live and Breathe Qlik & AWS.
Follow me on my LinkedIn | Know IPC Global at ipc-global.com