Pour déterminer votre adresse IP publique:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Titre = "Adresse Ip Publique !"
URL = "http://monip.org"
Set ie = CreateObject("InternetExplorer.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject") 
ie.Navigate (URL) 
ie.Visible=false
DO WHILE ie.busy
wscript.sleep 100
LOOP
Data = ie.document.documentElement.innertext 
ie.Quit 
Set ie = Nothing
Set objRegex = new RegExp
objRegex.Pattern = "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
objRegex.Global = False
objRegex.IgnoreCase = True
Set Matches = objRegex.Execute(Data)
For Each Match in Matches   
    MsgBox "L'adresse IP Publique est : " &vbCr& Match.Value,64,Titre 
Next