Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to apply bookmark for only few objects in a sheet.
Whether it is possible , if it is possible how i can implement in my file.
Regards
Venkat
U can't give something like ActiveDocument.GetSheetObject("LB02").GetSelectedValue bcoz this is not supported
and in ur case when u have a input box You will take a variable in that not a column right .So if u are adding or not
adding that variable in the bookmark the value is going to remain the same .Tell me whether i understood ur problem
clearly or not
Hi
when i am using the macro code it is removing other Bookmarks also. See below
// Your Code
Sub TestBM
ActiveDocument.ClearDocBookmarks
ActiveDocument.Fields("DefectName").Clear
ActiveDocument.CreateDocBookmark false, "BMTest"
ActiveDocument.Back
End Sub
// I am trying below Code (BUT getting an Error Message)
Sub TestBM
ActiveDocument.ClearDocBookmarks "BMTest" 'It should remove only this BMTest Bookmark.No other Bookmarks should be removed.
ActiveDocument.Fields("DefectName").Clear
ActiveDocument.CreateDocBookmark false, "BMTest"
ActiveDocument.Back
End Sub
I hope you understand the problem.
Regards
venkat
Hi ,
try this
ActiveDocument.RemoveDocBookmark "BMTest"
Hi
I tried this but it is changing the BookmarkID, i need to create with same BookmarkdID
Ex Consider i want to create a Bookmark With BookmarkID="BM01".
Sub TestBM
ActiveDocument.RemoveDocBookmark "BMTest" '
ActiveDocument.Fields("DefectName").Clear
ActiveDocument.CreateDocBookmark false, "BMTest" //It should create with BookMarkID=BM01
ActiveDocument.Back
End Sub
Pls check this.
Regards
Venkat
Hi,
If u create a new bookmark qlivkiew will give a new id to that it will not replace with a old id
Also y u want to retain the old id any reason for that
HI,
Yes, i created a button to Apply Bookmark , there i am providing the Existed BookmarkID="BM01".
Regards
Venkat