WebFormatting Property

Microsoft Excel Visual Basic

XlWebFormatting can be one of these XlWebFormatting constants.
xlWebFormattingAll
xlWebFormattingRTF
xlWebFormattingNone default.

expression.WebFormatting

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

Remarks

Use this property only when the query table’s QueryType property is set to xlWebQuery and the query returns an HTML document.

Example

This example adds a new Web query table to the first worksheet in the first workbook, imports all of the Web page formatting applied to the data, and then refreshes the query table.

Set shFirstQtr = Workbooks(1).Worksheets(1) 
Set qtQtrResults = shFirstQtr.QueryTables _
    .Add(Connection := "URL;http://datasvr/98q1/19980331.htm", _
        Destination := shFirstQtr.Cells(1,1))
With qtQtrResults
    .WebFormatting = xlAll
    .Refresh
End With