VSTO 2005, Bookmarks and a Concerned Reader

Yesterday, I received feedback from a reader that the screen capture in the post for February 10th had nothing to do with Microsoft Word 2003 bookmarks. Now, I am very pleased that "Concerned Reader" posted this feedback. The fact that the feedback is wrong (don't worry, Concerned Reader, it's actually not your fault) will help me emphasize even more what kind of new world VSTO 2005 takes you into. You see, looking at the screen capture, you see this line of code:


Where's the bookmark? It's CustomerName. Looking more closely at the text of what I wrote yesterday, you can see that what I am calling attention to is that, whereas in previous Word VBA code you had to walk the OM to index your bookmarks, in VSTO 2005, they are objects. CustomerName is the bookmark, and, I said, it hangs directly off the document object. How can that be? It's because in the class definition for my document, as I add bookmarks (or listobjects in Excel) a class definition for the bookmark is created, and this is referenced in my document class. Thus, the document provides direct access to the bookmark instance as an object.

Additionally, the bookmark has all sorts of new power, most notably databinding. More on that in my next post.

 Rock Thought for the day: The media push is on for Green Day right now leading up to the Grammy's. This is how the music/media industry works: the label, the band's agency, and others find a way to promote the band (in this case it's about the band "Saving Rock and Roll"), and they generate as much publicity as they can. Supposedly, part of saving rock and roll is that the band's last album has a strong political current. Now, I find the band's album likeable. But, saving Rock and Roll? Is having a strongly political album really such a reach nowadays? Honestly, this is hyperbole on steroids. Their current LP is good, solid and probably much better than good. But, it's hardly ground-breaking. Ten years from now, I doubt we will be discussing it they way we do Nirvana's first album or Gish. Political? Not strictly speaking, but they saved rock and roll.

Comments (1)

  1. paula says:

    hey lil bro. read your stuff, i really like is all this your writing.i am so impressed. dont know all this stuff is interesting.your sis #1.

Skip to main content