03-22-2020
04:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-22-2020
04:40 AM
Hi,
Can anybody correct this code to open the partDocument. If "=" sign not there.
Option Explicit
Sub DescriptCheck()
Dim oApp As Application
Set oApp = ThisApplication
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = oApp.ActiveDocument
Dim oPartDoc As PartDocument
Dim oProp As Property
For Each oPartDoc In oAsmDoc.AllReferencedDocuments
Set oProp = oPartDoc.PropertySets.Item("Design Tracking Properties").Item("Description")
Dim oVal As Variant
oVal = oProp.Expression
MsgBox (oVal)
If Left(oVal, 1) = "=" Then
MsgBox ("yes")
Else
'oPartDoc.Open I need this line to open the doc
End If
Next
End Sub