Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

How to extend Vs.Net "Quick Info" feature?

Hi,

I've tried this question in a number of .Net EMail Lists and
can't get anywhere with it. However you guys seem to be a
much smarter, advanced and experienced group - so I'm
hopeful for some great guidance and ideas here.

In a very real way, this question has to do with automating
Microsoft Office applications in the .Net framework
environment. I believe someone has previously ask about that
- but this is a more specific question.

I just love the "Quick Info" feature in VS.Net
++++++++++++++++++++++++++++++++++++++++++++++

Just bring the mouse up to a variable (I think you have to
be in debug mode) and you can see the value of the variable
- and sometimes other things as well.

  No need to select or click on the variable - its value is
  presented right there - either directly above or below the
  variable. And of course the AddoN program Visual Assist
  takes this idea even further - to, I believe, great
  advantage.

To me that "Quick Info" feature is really slick and timesaving.

How to Implement "Quick Info" in Microsoft Word
+++++++++++++++++++++++++++++++++++++++++++++++

I see that I can use .Net InterOP in VS.Net to access the
Microsoft Word class .DLLs that allow one to automate
Microsoft Word through its own (MS Word) object model. I
think I got that part worked out OK - adding the references
in VS.Net.

So, with that in place, I'm looking for some code and/or
explanation on how to implement "Quick Info" in Microsoft
Word.

  I can't see how - in C# or VB code - to relate the current
  mouse position to the word under the mouse pointer.

I'd like to be able to put my mouse pointer (NO right-mouse-
button click needed) on a word in MsWord document and see
some "Quick Info" - right next to that word - "Quick Info"
that I designed to help the document writer.

    One example of great "Quick Info" would be the word's
    definition.

Any ideas? Please point me in the right direction?

Thanks Sooo Much
Gene

Eugene Mortimore
Saturday, September 21, 2002

Two things:

1) If you're automating Word with interop, you should NOT be adding your own reference to the Word COM DLLs. Instead, you should be using the Word PIA. See http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/999/msdncompositedoc.xml for the download.

2) The Office-like way to do what you're asking about is to create a Smart Tag, at least assuming you're working in Word 2002. Same effect, slightly different UI.  http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/652/msdncompositedoc.xml&frame=true gets you that one.

Mike Gunderloy
Saturday, September 21, 2002

*  Recent Topics

*  Fog Creek Home