C
Caroline
I tried to write this standalone VB6 application:
Private Sub btnRun_Click()
Dim PathFileName As String
On Error GoTo ErrbtnRun_Click
PathFileName = Text1.Text
Set VApp = CreateObject("Visio.Application")
Err = 0 ''GetLastError() value
Set Vdoc = VApp.Documents.Open(PathFileName)
Dim AShape As Visio.Shape
Dim pageObject As Visio.Page
For ipagctr = 1 To Vdoc.Pages.Count
'MsgBox "ipagctr=" & ipagctr
Set pageObject = Vdoc.Pages(ipagctr)
...
the programs runs fine when PathFileName is "C:\mini .vsd"
When however I try to open "C:\Documents and Settings\Administrator\My
DocumentsDrawing1 temp.vsd", I get a "File not found." error.
Why?
Private Sub btnRun_Click()
Dim PathFileName As String
On Error GoTo ErrbtnRun_Click
PathFileName = Text1.Text
Set VApp = CreateObject("Visio.Application")
Err = 0 ''GetLastError() value
Set Vdoc = VApp.Documents.Open(PathFileName)
Dim AShape As Visio.Shape
Dim pageObject As Visio.Page
For ipagctr = 1 To Vdoc.Pages.Count
'MsgBox "ipagctr=" & ipagctr
Set pageObject = Vdoc.Pages(ipagctr)
...
the programs runs fine when PathFileName is "C:\mini .vsd"
When however I try to open "C:\Documents and Settings\Administrator\My
DocumentsDrawing1 temp.vsd", I get a "File not found." error.
Why?