Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / June 2004

Tip: Looking for answers? Try searching our database.

Macro for setting Tools/Options

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Agoston Bejo - 30 Jun 2004 09:58 GMT
Hello,
I am trying to create a macro that enables/disables Tools/ Options /
HTML/XML / HTML / Attribute Value Quotes.

I have tried recording the macro and setting the function but all what
recorded was the following VB code:

DTE.ExecuteCommand("Tools.Options")

Which simply brings up the Tools/Options dialog. Is there a way to somehow
code the further actions for setting the above-mentioned parameters?

Thx,
Gus
Carlos J. Quintero [MVP] - 30 Jun 2004 16:17 GMT
Try instead using

DTE.Properties(category, page)

which returns a collection of Property objects where you can change the
value for a given property name.

You have to guess the names of category and page, which in you case is quite
difficult but here you have some hints:

- The values for Text Editor / HTML/XML / General are stored in registry
key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor\HTML/XML

And you can retrieve them with

       Dim colProperties as EnvDTE.Properties

       colProperties = DTE.Properties("TextEditor", "HTML/XML")

- But your value is are stored in registry key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor\HTML
Editor

but I have been unable for 10 minutes to get the correct category and page.
I suppose that you can always change the registry directly...

- Here you have the docs about category and page names:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/v
xgrfdtepropertiescollections.asp


But yours is not in those lists...

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 trying to create a macro that enables/disables Tools/ Options /
[quoted text clipped - 10 lines]
> Thx,
> Gus

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.