Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
HI Kaushik, Sorry for late reply
Your code is working in my file and thanks for you helping in this post.
Regards
Venkt