Hi All
Markdmac has helped me hugely with my code in my previous thread but now i am yet again stuck and as things have moved on thought id start a new thread,
Can anyone tell me where the error is in my code please, i just get a blank IE screen when i run it
thanks
Gibbo
On Error Resume Next
Dim objFSO, oFO, oFolder, oFile, picDir, IE, Locus
Set objFSO = CreateObject("Scripting.FileSystemObject")
picDir = "C:\Documents and Settings\HP_Owner\Desktop\Slideshow\pics\"
Set oFolder = objFSO.GetFolder(picDir)
Set IE = CreateObject("InternetExplorer.Application")
IE.toolbar = False : IE.menubar = False : IE.statusbar = False : IE.Resizable = False
For Each oFile In oFolder.Files
If Right(oFile.Name,3) = "jpg" Or Right(oFile.Name,3) = "gif" Then
Locus = "file://" & Replace(oFile.ParentFolder,"\","/")&"/" & oFile.Name
With IE.document
.Open
.WriteLn "<HTML><HEAD>"
.WriteLn "<TITLE>HELLO!</TITLE></HEAD>"
.WriteLn "<BODY>"
.WriteLn "Hello world"
.WriteLn "<img src='" & Locus & "'><br>"
IE.Visible = True
WScript.Sleep 5000
.WriteLn "</BODY>"
.WriteLn "</HTML>"
.Close
End With
IE.Visible = True
WScript.Sleep 5000
End If
Next
Set IE = Nothing
Set objFSO = Nothing
Markdmac has helped me hugely with my code in my previous thread but now i am yet again stuck and as things have moved on thought id start a new thread,
Can anyone tell me where the error is in my code please, i just get a blank IE screen when i run it
thanks
Gibbo
On Error Resume Next
Dim objFSO, oFO, oFolder, oFile, picDir, IE, Locus
Set objFSO = CreateObject("Scripting.FileSystemObject")
picDir = "C:\Documents and Settings\HP_Owner\Desktop\Slideshow\pics\"
Set oFolder = objFSO.GetFolder(picDir)
Set IE = CreateObject("InternetExplorer.Application")
IE.toolbar = False : IE.menubar = False : IE.statusbar = False : IE.Resizable = False
For Each oFile In oFolder.Files
If Right(oFile.Name,3) = "jpg" Or Right(oFile.Name,3) = "gif" Then
Locus = "file://" & Replace(oFile.ParentFolder,"\","/")&"/" & oFile.Name
With IE.document
.Open
.WriteLn "<HTML><HEAD>"
.WriteLn "<TITLE>HELLO!</TITLE></HEAD>"
.WriteLn "<BODY>"
.WriteLn "Hello world"
.WriteLn "<img src='" & Locus & "'><br>"
IE.Visible = True
WScript.Sleep 5000
.WriteLn "</BODY>"
.WriteLn "</HTML>"
.Close
End With
IE.Visible = True
WScript.Sleep 5000
End If
Next
Set IE = Nothing
Set objFSO = Nothing