InsertInteractiveButton Method

Microsoft FrontPage Visual Basic

Show All Show All

InsertInteractiveButton Method

Inserts an interactive button into a document at the specified position.

expression.InsertInteractiveButton(Range, styles, title, width, height, URL, target)

expression    Required. An expression that returns one of the objects in the Applies To list.

Range    Required IHTMLTxtRange. Specifies the position where to insert the interactive button. If the range specified includes text or elements, the button will replace these.

styles    Required String. Specifies the style that represents the appearance of the interactive button.

The style parameter can be one or more of the following semi-colon delimited String values:

PREFIXDESCRIPTIONExample
fp-align-rect:Specifies the pixel coordinates for the original text alignment based on the source original image. Image scales appropriately for the preview. Coordinates are left, top, right, bottom or blank (default is the entire image).fp-align-rect: 0, 0, 50, 20
fp-align-rect1:Specifies the pixel coordinates for the hover text alignment based on the source hover image. Coordinates are left, top, right, bottom or blank (default is the entire image).fp-align-rect1: 0, 0, 50, 20
fp-align-rect2:Specifies the pixel coordinates for pressed text alignment based on the source pressed image. Coordinates are left, top, right, bottom or blank (default is the entire image).fp-align-rect2: 0, 0, 50, 20
fp-bgcolor:Specifies the default background color for the button. Any Web safe or named color value that is allowed for Cascading Style Sheets (default is white). Note: this property isn’t used for transparent buttons.fp-bgcolor: red
fp-btn: Specifies the internal name for a preset button. Preset button styles can be one of the following:
Border Bottom 1   Brick Column 6   Embossed Capsule 7   Glass Tab 3   
Border Bottom 2   Brick Column 7   Embossed Capsule 8   Glass Tab 4   
Border Bottom 3   Brick Column 8   Embossed Capsule 9   Glass Tab 5   
Border Bottom 4   Brick Column 9   Embossed Rectangle 1   Glow Capsule 1   
Border Bottom 5   Brick Row 1   Embossed Rectangle 2   Glow Capsule 2   
Border Bottom 6   Brick Row 2   Embossed Rectangle 3   Glow Capsule 3   
Border Bottom 7   Brick Row 3   Embossed Rectangle 4   Glow Capsule 4   
Border Bottom 8   Brick Row 4   Embossed Rectangle 5   Glow Capsule 5   
Border Bottom 9   Brick Row 5   Embossed Rectangle 6   Glow Capsule 6   
Border Left 1   Brick Row 6   Embossed Rectangle 7   Glow Capsule 7   
Border Left 2   Brick Row 7   Embossed Rectangle 8   Glow Capsule 8   
Border Left 3   Brick Row 8   Embossed Rectangle 9   Glow Capsule 9   
Border Left 4   Brick Row 9   Embossed Tab 1   Glow Rectangle 1   
Border Left 5   Chain Column 1   Embossed Tab 2   Glow Rectangle 2   
Border Left 6   Chain Column 2   Embossed Tab 3   Glow Rectangle 3   
Border Left 7   Chain Column 3   Embossed Tab 4   Glow Rectangle 4   
Border Left 8   Chain Column 4   Embossed Tab 5   Glow Rectangle 5   
Border Left 9   Chain Column 5   Embossed Tab 6   Glow Rectangle 6   
Braided Column 1   Corporate 1   Embossed Tab 7   Glow Rectangle 7   
Braided Column 2   Corporate 2   Embossed Tab 8   Glow Rectangle 8   
Braided Column 3   Corporate 3   Embossed Tab 9   Glow Rectangle 9   
Braided Column 4   Corporate 4   Glass Capsule 1   Glow Tab 1   
Braided Column 5   Corporate 5   Glass Capsule 2   Glow Tab 2   
Braided Row 1   Corporate 6   Glass Capsule 3   Glow Tab 3   
Braided Row 2   Corporate 7   Glass Capsule 4   Glow Tab 4   
Braided Row 3   Corporate 8   Glass Capsule 5   Glow Tab 5   
Braided Row 4   Corporate 9   Glass Rectangle 1   Glow Tab 6   
Braided Row 5   Embossed Capsule 1   Glass Rectangle 2   Glow Tab 7   
Brick Column 1   Embossed Capsule 2   Glass Rectangle 3   Glow Tab 8   
Brick Column 2   Embossed Capsule 3   Glass Rectangle 4   Glow Tab 9   
Brick Column 3   Embossed Capsule 4   Glass Rectangle 5   Jewel 1   
Brick Column 4   Embossed Capsule 5   Glass Tab 1   Jewel 1   
Brick Column 5   Embossed Capsule 6   Glass Tab 2      
fp-btn: Border Bottom 1
fp-font:Specifies the font name for the button text.fp-font: verdana
fp-font-color-hover:Specifies the font color for text for the hover state. Any Web safe or named color value that is allowed for Cascading Style Sheets (blank defaults to "Automatic").fp-font-color-hover: black
fp-font-color-normal:Specifies the font color for the button text when in the normal state. Any Web safe or named color value that is allowed for Cascading Style Sheets (blank defaults to black)fp-font-color-normal: #FF0000
fp-font-color-pressed:Specifies the font color for button text when in the pressed state. Any Web safe or named color value that is allowed for Cascading Style Sheets or blank (blank equates to "Automatic").fp-font-color-pressed: #00FF00
fp-font-size:Specifies is the font size, measured in points, for the button text.fp-font-size: 10
fp-font-style:Specifies the font style characteristics for the button text. Can be Regular, Italic, Bold, and Bold Italic.fp-font-style: bold
fp-img-hover:Specifies whether FrontPage creates a hover image for a checkbox button. Can be 0 or 1 (1 means true).fp-img-hover: 1
fp-img-pressed:Specifies whether FrontPage creates a pressed image for a checkbox button. Can be 0 or 1 (1 means true).fp-img-pressed: 1
fp-justify-h:Specifies the horizontal alignment for the button text. Can be left, center, right or blank (default is center).fp-justify-h: left
fp-justify-v:Specifies the vertical alignment for button text. Can be top, center, bottom or blank (default is center).fp-justify-v: bottom
fp-preload:Specifies whether the images for a checkbox button are preloaded on the page. Can be 0 or 1 (1 means true).fp-preload: 0
fp-transparent:Specifies whether to use a solid or a transparent background for a radio button. Can be 0 or 1 (1 means transparent).fp-transparent: 1
fp-direction:Specifies whether the text is rendered as left-to-right or right-to-left. Can be "rtl" or "ltr".fp-direction: ltr

title    Required String. Specifies the text displayed on the button

width    Required Long. Specifies the width of the button.

height    Required Long. Specifies the height of the button.

URL    Optional Variant. Specifies the URL that is opened when a user clicks on the button in a browser.

target    Optional Variant. Specifies the target window in which to display the linked page. Correspond to the settings for the target property.

Example

The following example inserts an interactive button into the active document at the insertion point.

    Dim objRange As IHTMLTxtRange

Set objRange = ActiveDocument.selection.createRange
ActiveDocument.InsertInteractiveButton objRange, "fp-btn: Border Bottom 2", _
    "New Button", 100, 20, "http://www.microsoft.com", "_blank"