Not a Member Yet,
Click here to Register

ID: 362
Viewed: 2959
Added: Aug 19, 2002
Version:
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

Displaying Knowledge Base Articles
June 30, 1999

Problem: I often see a reference To a Knowledge Base article With no Q-number hyperlink To take Me there. I have To copy the Q number, paste it into the Microsoft search page, And click On the resulting article.

Solution: A custom context menu For IE that allows Me To highlight a Q number In the browser, Right-click On it, And Select Knowledge Base from the menu. This loads the Knowledge Base article In a New browser window.
With the information provided by MSDN, I was able To achieve this.
Knowledge Base articles have a simple URL which can easily be derived from the Q number. I used VBScript because the String manipulation Is rather simple.
The following registry entry Is required To try it out (Or you can just run this file ):

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Knowledge Base]
Default value="http://wsh.glazier.co.nz/knowledgebase.htm"
Binary Value "Contexts"=Hex:10

Highlight all by clicking in box
<!---Declaration--->
none

Highlight All
<!---Code--->
'Here Is the source code:


Const sBaseURL = "http://support.microsoft.com/support/kb/articles/"
Set sourceWin = external.menuArguments
Set activePage = sourceWin.document
Set activeSelection = activePage.selection ' This gives us the highlited text
Set rngActive = activeSelection.createRange
ArticleID = rngActive.Text
If ArticleID <>"" Then
KnowledgeBaseURL = sBaseURL & Left(ArticleID, 4) & "/" & _
Mid(ArticleID,5,1) & "/" & _
Right(ArticleID,2) & ".asp"
window.Open KnowledgeBaseURL,Null,"resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,width=790,height=590"
Window.Close()
Else
MsgBox "Q number not specified"
Window.Close
End If;


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2024 snippetlibrary.com All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!