- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If I have an occurrence selected how can I tell if it is a normal part or a content center part?
For example: Make sure you select a part before running this. I stripped out the logic to ensure this happens for clarity.
Sub IsContent()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
Dim NewFile As String
Dim oSS As SelectSet
Set oSS = oDoc.SelectSet
Select Case True
Case oSS.Count = 1
If oSS.Item(1).Type = ObjectTypeEnum.kComponentOccurrenceObject Then
'If oSS.Item(1) is a content center part then exit sub
OccurrenceName = oSS.Item(1).Name
End If
End Select
End Sub
The commented line is where I need the logic.
Solved! Go to Solution.