Opening Microsoft documentation web pages using VBE_Extras
- John
- 2 days ago
- 3 min read
A feature that I felt was missing from VBE_Extras was the ability to open the Microsoft documentation web pages. This feature has now been added. It can be accessed in two ways:
Via the "Info for code at cursor" command when that command has been triggered for a word in a type library (not, for example, when it has been triggered for something that is declared within your VBA Project)

Via the "Show all members" command when that command is showing members of an object that is declared in a type library (as above, not when it has been triggered for something that is declared within your VBA Project)

How VBE_Extras improves on opening Microsoft documentation web pages compared to the VBE
While this feature works when using early binding, the greater benefit comes when using Special binding. This is because the VBE itself will often open the correct Microsoft documentation web page when using early binding (i.e. via pressing the F1 key). VBE_Extras will now do the same when using early binding or using special binding.
VBE_Extras can open the Microsoft documentation web pages for the Scripting library (in which the FileSystemObject and the Dictionary are declared).
When documentation is missing, VBE_Extras will look-up the documentation for parent members in the hierarchy and offer to open that documentation (whereas the VBE just gives up and opens a fairly hopeless "No F1 help match was found" web page). For example, for the relatively newly added InsertPictureInCell member of the Excel.Range object, there is no documentation ... so VBE_Extras will let you know that is the case and offer to open the documentation for the Range object instead.

There are still limitations though ... but the same limitations apply to the VBE itself
This functionality only works with a specific set of type libraries (listed below). This is because not all type libraries have online documentation.
The way that documentation is organised for each type library is different ... and, often, is rather chaotic with various objects/members sharing the same web page ... VBE_Extras has to try and figure all of this out and sometimes doesn't get it right (and neither does the VBE's F1 help).
The documentation often includes spelling mistakes in URLs ... the Forms library is particularly bad in this regard with, for example, the Caption, Parent, Default and Name properties of the UserForm and Control objects being listed on web pages which instead of including the text "property" in the URL instead use (respectively) "propert", "propertya", "propertyd" and "propertye" ... again, VBE_Extras has to try and figure all of this out and doesn't get it right 100% of the time (again, neither does the VBE's F1 help always get it right).
Many type libraries include various hidden members ... invariably there just is no documentation for these members ... for example, in the VBA type library, there is no documentation for StrPtr, ObjPtr and VarPtr.
Sometimes, documentation is just missing ... many of the new objects and members recently added to the Excel, Access, Word etc type libraries do not have any documentation.
Other info ...
VBE_Extras can open Microsoft documentation web pages in a number of locales in addition to the default (i.e. US English). In the "Docs" tab of the VBE_Extras Settings dialog, use the "Web page locale" dropdown to select the desired locale.
VBE_Extras also provides the ability to open Windows documentation web pages when working with Windows API declarations. See the Using 'F1' to view Windows API web pages post for details.
The type libraries that VBE_Extras can open Microsoft documentation web pages for
Visual Basic For Applications (but there is very limited documentation for the newly added VBA.RegExp object and its members)
Microsoft Office Object Library
Microsoft Forms Object Library
Microsoft Excel Object Library
Microsoft Word Object Library
Microsoft PowerPoint Object Library
Microsoft Outlook Object Library
Microsoft Access Object Library
Microsoft Project Object Library
Microsoft Publisher Object Library
Microsoft Visio Object Library
Microsoft Office Access database engine Object Library
Microsoft ActiveX Data Objects Library
Microsoft Visual Basic for Applications Extensibility
Microsoft Scripting Runtime


Comments