1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Dim metatags, meta, metaDoc
'IE compatible
metaDoc="IE=EmulateIE7"
'Création de l'objet IE
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate ("http://www.mon-url.com")
ie.MenuBar=false
ie.ToolBar=false
ie.Visible=true
'Création du document URL
Set IEDoc = IE.document
'Attendre la fin du chargement de l'URL
Do While Not IEDoc.readyState = "complete"
DoEvents
Loop
'Forcer le meta document par la variable metaDoc
Set metatags = IEDoc.getElementsByTagName("meta")
For Each meta In metatags
If UCase(meta.getAttribute("httpEquiv")) <> "" Then
'Changer le mode document
meta.setAttribute "content", metaDoc
Exit For
End If
Next
Set ie = Nothing
Set IEDoc = Nothing
Set metatags = Nothing
Set meta = Nothing |
Partager