DOCUMENT:Q190049 07-AUG-1998 [vbwin] TITLE :BUG: Compile Error When Using Document.Write in DHTML App PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0; OPER/SYS:WINDOWS KEYWORDS:kbVBp600bug kbInternet kbPageDesigner ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 6.0 --------------------------------------------------------------------- SYMPTOMS ======== When you are using Document.Write in a DHTML application you receive the following error: Compile error: Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic. RESOLUTION ========== Change the value of the innerText property of a tag instead of using the Document.Write. For example, HTML for the element:

Replacement code in Page Designer: Subhead1.innerText="Heading One" STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. REFERENCES ========== On the MSDN site at the following location there is more detailed information about innerText. Visual Basic Documentation\Using Visual Basic\Component Tools Guide\ Building Internet Applications\Developing DHTML applications\Writing code using Dynamic HTML\Handling Text in the page designer Please see the following Microsoft Knowledge Base article for more information on the DHTML Page Designer: ARTICLE-ID: Q190249 TITLE : INFO: DHTML Page Designer Section of VB6 Readme.htm Additional query words: ====================================================================== Keywords : kbVBp600bug kbInternet kbPageDesigner Version : WINDOWS:6.0; Platform : WINDOWS Issue type : kbbug Solution Type : kbpending ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.