FP2000: How to Display Custom Code from the HTML Markup Component in a Message Box (219724)



The information in this article applies to:

  • Microsoft FrontPage 2000

This article was previously published under Q219724

SUMMARY

This article contains sample Microsoft Visual Basic for Applications (VBA) code that you can use to display the contents of the HTML Markup component in a message box.

MORE INFORMATION

When you create your web pages, you may need to use the HTML Markup component to add custom code to your web pages. The following sample VBA code displays the contents of the HTML Markup component in a message box, which gives you faster access to the contents.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

Sub ShowMarkUp()
   Dim wb As FPHTMLFrontPageBotElement
    Set wb = ActiveDocument.all.tags("webbot").Item(0)
   MsgBox wb.getBotAttribute("S-HTML")
End Sub
				
After you add this code to the Visual Basic Editor, you can create a new toolbar and assign the Show MarkUp macro to a new button.

NOTE: The HTML Markup component must be the first component on the page. If another component is first on the page, the message box will be empty.

For more information about creating a toolbar, click Microsoft FrontPage Help on the Help menu, type create toolbar in the Answer Wizard, and then click Search to view the topic.


For more information about customizing your toolbars, click Microsoft FrontPage Help on the Help menu, type view or customize toolbars in the Answer Wizard, and then click Search to view the topic.


For additional information about how to assign a macro to a toolbar button, click the article number below to view the article in the Microsoft Knowledge Base:

242585 FP2000: How to Assign a Macro to a Toolbar Button


Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbinfo KB219724