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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create Bookmark by macro code

HI,

how can i create a bookmarks by using macro code.

Actually, in my file having an input box , there the user enters name and after clicking the button the BookMark should create with the name which is inside the input box.

If the user doesnot enter the name in input box and clicks on button then should display warning window "Please enter the Name in input box".

Please can anyone provide a solution on this.

Regards

Venkat.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   Here is the code.

  

set v = ActiveDocument.Variables("Variable1")

if v.GetContent.String = "" then

Msgbox "Please enter the name of bookmark"

else

ActiveDocument.CreateUserBookmark v.GetContent.String

v.SetContent "",true

Msgbox "Bookmark Cretaed"

End if

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   Here is the code.

  

set v = ActiveDocument.Variables("Variable1")

if v.GetContent.String = "" then

Msgbox "Please enter the name of bookmark"

else

ActiveDocument.CreateUserBookmark v.GetContent.String

v.SetContent "",true

Msgbox "Bookmark Cretaed"

End if

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

HI Kaushik, Sorry for late reply

Your code is working in my file and thanks for you helping in this post.

Regards

Venkt