Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 8¤ë1¤é, ¤U¤È9®É48¤À, "Chip Pearson" wrote:
The following code works for me with Excel 2007 and Visio 2007. Sub OpenVisioDoc() Dim FName As String Dim VisioApp As Object On Error Resume Next Set VisioApp = GetObject(, "Visio.Application") If VisioApp Is Nothing Then Set VisioApp = CreateObject("Visio.Application") If VisioApp Is Nothing Then MsgBox "Can't connect to Visio" Exit Sub End If End If On Error GoTo 0 FName = "C:\Path\FileName.vsd" VisioApp.documents.Open FName ' VisioApp.Visible = True End Sub "moonhk" wrote in message ... Hi All how to open visio file by Excel VBA ? I try below coding not ok. Set oApp = CreateObject("Visio.Application") oApp.Visible = True MsgBox FN oApp.Documents.Open FN- ÁôÂóQ¤Þ¥Î¤å¦r - - Åã¥Ü³Q¤Þ¥Î¤å¦r - Using below coding works. '~~ http://support.microsoft.com/kb/309603 Set oApp = CreateObject("Visio.Application") Set docsObj = oApp.Documents Set DocObj = docsObj.Open(FN) ' Clear the variable from memory. Set docsObj = Nothing Set DocObj = Nothing Set oApp = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I export a Excel file to a Visio drawing? | Excel Discussion (Misc queries) | |||
Microsoft Visio templates - Stencil for Visio to create IT diagrams &network design | Excel Worksheet Functions | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
Can an Excel file be converted into Visio? | Excel Discussion (Misc queries) |