06-25-2016
12:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-25-2016
12:10 AM
Hi,
The Following code could full fill your requirement.
Sub Edit_Column_name()
Dim oDoc As Document
Dim oSheet As Sheet
Dim oPartsList As PartsList
Dim oPartsListColumn As PartsListColumn
Dim oColumnName As String
Dim oName As String
Set oDoc = ThisApplication.ActiveDocument
If oDoc.DocumentType = kDrawingDocumentObject Then
Set oSheet = oDoc.ActiveSheet
oSheet.Activate
For Each oPartsList In oSheet.PartsLists
For Each oPartsListColumn In oPartsList.PartsListColumns
oColumnName = oPartsListColumn.Title
oName = InputBox("Enter the new name for the Column : " + oColumnName + "", "Enter Column Name")
If oName <> "" Then
oPartsListColumn.Title = oName
End If
Next
Next
Else
MsgBox "The Selected document is not a drawing document please select a drawing document and continue", vbOKOnly, "Edit Column Name"
Exit Sub
End If
End Sub
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution