R
Rob
I'm trying to get information from my shapes as they are double-clicked but
I'm having problems.
Here's what I have so far...
Sub Open_PDF()
Dim strPDFPath As String
strPDFPath = "z:\Documentation\PDFs\"
Dim strIEPath As String
strIEPath = "C:\program files\internet explorer\iexplore.exe"
Dim strExtension As String
strExtension = ".pdf"
Dim varPropDWG As Variant
Dim varPropREV As Variant
Dim varPropREVShort As Variant
Dim vsoShape As Shape
Dim vsoCell As Visio.Cell
varPropPDF = "Ref_000639" ' This needs to be the Value of Prop.PDF --
I placed this Drawing Number in Manually for testing purposes only
----- I've also tried using varPropPDF = vsoShape.CellsSRC(3, 2, 5)
varPropREV = "Rev B2" ' This needs to be the Value of Prop.REV --
I placed this Drawing Rev in Manually for testing purposes only
----- I've also tried using varPropREV = vsoShape.CellsSRC(3, 8, 5)
varPropREVShort = Right(varPropREV, Len(varPropREV) - 4) ' Cut the
First Four Characters from the Value of Prop.REV since it is not needed
If varPropREVShort = "-" Then
Shell strIEPath & " " & strPDFPath & varPropDWG & "_" &
strExtension, vbNormalFocus
Else
Shell strIEPath & " " & strPDFPath & varPropDWG & "_" &
varPropREVShort & strExtension, vbNormalFocus
End If
End Sub
But when I try it I always get the same error below...
Runtime Error '91':
Object variable or With block variable not set
Any Help Would be Awesome.
Thanks In Advance,
Rob
I'm having problems.
Here's what I have so far...
Sub Open_PDF()
Dim strPDFPath As String
strPDFPath = "z:\Documentation\PDFs\"
Dim strIEPath As String
strIEPath = "C:\program files\internet explorer\iexplore.exe"
Dim strExtension As String
strExtension = ".pdf"
Dim varPropDWG As Variant
Dim varPropREV As Variant
Dim varPropREVShort As Variant
Dim vsoShape As Shape
Dim vsoCell As Visio.Cell
varPropPDF = "Ref_000639" ' This needs to be the Value of Prop.PDF --
I placed this Drawing Number in Manually for testing purposes only
----- I've also tried using varPropPDF = vsoShape.CellsSRC(3, 2, 5)
varPropREV = "Rev B2" ' This needs to be the Value of Prop.REV --
I placed this Drawing Rev in Manually for testing purposes only
----- I've also tried using varPropREV = vsoShape.CellsSRC(3, 8, 5)
varPropREVShort = Right(varPropREV, Len(varPropREV) - 4) ' Cut the
First Four Characters from the Value of Prop.REV since it is not needed
If varPropREVShort = "-" Then
Shell strIEPath & " " & strPDFPath & varPropDWG & "_" &
strExtension, vbNormalFocus
Else
Shell strIEPath & " " & strPDFPath & varPropDWG & "_" &
varPropREVShort & strExtension, vbNormalFocus
End If
End Sub
But when I try it I always get the same error below...
Runtime Error '91':
Object variable or With block variable not set
Any Help Would be Awesome.
Thanks In Advance,
Rob