Default WebOptions Object Example

This example shows how to open a web page without loading the pictures:

Sub OpenHTMLWithoutPictures() Dim bLoadImages As Boolean Dim oDWO As DefaultWebOptions 'Get the Default Web options Set oDWO = Application.DefaultWebOptions 'Remember whether to load pictures bLoadImages = oDWO.LoadPictures

'Tell Excel not to load pictures, for faster opening oDWO.LoadPictures = False 'Open a web page, without pictures Workbooks.Open "http://www.wrox.com" 'Restore the setting oDWO.LoadPictures = bLoadImages End Sub

0 0

Post a comment