I suppose that when you say "object" you mean "class" since the source code
has classes, not objects; objects are instances of classes that exist only
at run-time. If I understand well, then you have a source code file with a
"rectangle" class and you want a macro that receives the name of the class
and shows its properties, right?
This must be done using the code model functionality of the extensibility
model for addins and macros. The code model has 2 entry points:
- Project.CodeModel
- ProjectItem.FileCodeModel (a project item is a file).
You should read the documentation about the code model, but to have an idea
of the code that you need to use, see this article that I wrote to report a
bug and that has a macro that uses the code model:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555114
Notice that if your class resides on a compiled assembly instead of in
source code, you should need to use Reflection.

Signature
Carlos J. Quintero (Visual Developer - .NET MVP)
FAQs, Knowledge Base, Files, Docs, Articles, Utilities, etc. for .NET
addins:
http://groups.yahoo.com/group/vsnetaddin/ (free join)
> Hello:
> I am writing a macro in Visual Studio .Net 2003, and I was wondering if it is possible for a macro to access properties of objects that are
selected. For instance, assume I have the following object declared (on a
different page, but it can still be instanciated):
> Class rectangle
> Private _height as double
[quoted text clipped - 17 lines]
> Thanks,
> Andrew Wied