I've noticed that this is an older post, but I looked into it anyways. I am not quite certain as to what you want to do, but I'll try and point you in the right direction.
So you get the bookmarks collection with your last code. (I will change the symbol name for sake of clarity)
- (setq [color="red"]bkmrks[/color] (vlax-get-property (vlax-get-property wrdapp 'ActiveDocument) 'Bookmarks))
Now that you have the bookmarks collection, run a dump on it... See what you can do with it.
- (vlax-dump-object bkmrks T)
; Bookmarks: nil
; Property values:
; Application (RO) = #
; Count (RO) = 2
; Creator (RO) = 1297307460
; DefaultSorting = 0
; Parent (RO) = #
; ShowHidden = 0
; _NewEnum (RO) = #
; Methods supported:
; Add (2)
; Exists (1)
; Item (1)
Now you want to get a bookmark. Notice the 'Item' method? The (1) means it requires one argument.
- (setq bm (vlax-invoke-method bkmrks 'Item 1))
Now that you have a bookmark.... Run a dump on it to see what you can do with it.
; Bookmark: nil
; Property values:
; Application (RO) = #
; Column (RO) = 0
; Creator (RO) = 1297307460
; Empty (RO) = -1
; End = 0
; Name (RO) = "Book_Mark_One"
; Parent (RO) = #
; Range (RO) = #
; Start = 0
; StoryType (RO) = 1
; Methods supported:
; Copy (1)
; Delete ()
; Select ()
I hope that this helps you at least a little bit.
regards,
Hippe013 |