PDA

View Full Version : Search Visio Page



maestro_01
02-12-2010, 02:35 PM
Hello All,

On the click of a button, I would like to search a specific Visio document for text specified from a known value. Sounds simple yes, however, I believe the object classes in Visio are referenced a little differently and I get this error:

"Run-Time Error 432:

File name or class name not found during Automation operation"

Code:

Sub test()
Dim otest As Object

Set otest = GetObject("C:\My Documents\Highlighting work\Test.vsd", "Visio.Application")
otest.Visible = True


End Sub
Therefore, Visio is launched, but the file I want to open does not appear. How would I resolve this?

Thanks,

Maestro

maestro_01
02-14-2010, 08:20 PM
Actually, how do I solve the Run Time Error 432? I have double checked the filename and path a bunch of times, but keep getting this error. When the file name is taken out, the code works fine.

OBP
02-15-2010, 07:01 AM
Sorry, I know nothing about opening Visio, but I have seen this
http://bytes.com/topic/visual-basic/answers/867199-ms-access-error-429-activex-component-cant-create-object
Where the user is uing the file extension HTM and not VSD.

OBP
02-15-2010, 07:08 AM
I also found this on the Excel Forum about opening other files.
http://www.vbaexpress.com/forum/showthread.php?t=1125&highlight=Visio