Ik probeer een willekeurig document te openen vanuit visio met een macro. Dit lukt als het om bv een word document gaat, maar niet met bv txt, jpg en gif.
De foutmelding is:
PS Zoeken hier op GOT en het internet brengt mij niet veel verder. De meeste zaken aangaande automation gaan de ander kant uit (open visio vanuit word of zo)
De foutmelding is:
Het uiteindelijkde doel is om de filenaam te specificeren in een custom property UserManual en de gebruiker de macro te laten draaien (dubbel klik of context menu).runtime error '432':
File name or class name not found during automation operation
Visual Basic .NET:
Iemand een idee1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| Dim sel As Visio.Selection Set sel = ActiveWindow.Selection sel.IterationMode = visSelModeSkipSub If sel.Count <> 1 Then MsgBox "Select only one shape", vbCritical & vbOKOnly Else Dim s As Visio.Shape Set s = sel(1) Dim cellObj As Visio.Cell Dim DocObject As Object If s.CellExists("prop.UserManual", True) Then Set cellObj = s.Cells("prop.UserManual.value") Debug.Print s.Cells("prop.UserManual.value").Formula ' Set DocObject = GetObject("J:\Digital\Satellites\Eutelsat_Satellite_fleet_mid2001.jpg") ' Set DocObject = GetObject("F:\WimSDocuments\visio\PAS7\PAS7.doc") ' Set DocObject = GetObject("F:\WimSDocuments\visio\PAS7\visio.txt") Set DocObject = GetObject("F:\WimSDocuments\visio\PAS7\Panamsat_Satellites_Polar_View2.gif") DocObject.Application.Visible = True End If End If |
PS Zoeken hier op GOT en het internet brengt mij niet veel verder. De meeste zaken aangaande automation gaan de ander kant uit (open visio vanuit word of zo)
[ Voor 11% gewijzigd door Verwijderd op 25-05-2005 15:19 ]