MSHTML DocType object? Can't get the string

  • From: "Bryan Garaventa" <bryan@xxxxxxxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sat, 29 Sep 2007 21:46:21 -0700

Does anyone know how to get the string value out of the Document.DocType object using VB?

I asumed that a string value would be returned when this was called, but no luck. For instance,

' Asume that DocumentObject is the current Document object for the given web page.

Dim DocType as String = DocumentObject.DocType

This looks a little different in VB6, but you get the idea. Well, it doesn't work. There is no string since an object of type DocumentType is being returned.

However, there doesn't appear to be any way of creating a variable of type DocumentType in VB, which is presumably being returned by DocumentObject.DocType.

I just need to get the actual string for the DocType tag itself from the document object using VB.

Any ideas how I might be able to do this?

Thanks a million,

Bryan Garaventa

View the list's information and change your settings at

Other related posts: