Quote: "Just use a macro to change the item number to a 4 digit format"
I did not know that Item in Parts list in not hard-coded. This means that I can change value of Item column!!!
So I did just that in my macro, set Item & Qty for BOM ballon, and ... It works!!!
Thank you all for your help.
For reference, placing custom column's name from PartsList on "user property" for BOM balloon display setting does not work.
Here is the macro:
Public Sub ChangeItemColumValue()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
Dim oVendor As PartsListCell
Dim oPartNumber As PartsListCell
Dim oDetail As PartsListCell
Dim oItem As PartsListCell
Dim invPartNumber As String
Dim invCharPosition As Integer
' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
'Get value from PartNumber column
Set oPartNumber = oPartList.PartsListRows.Item(i).Item("NUMBER")
Set oItem = oPartList.PartsListRows.Item(i).Item("ITEM")
Set oVendor = oPartList.PartsListRows.Item(i).Item("SUPPLIER")
'find a specific part number
If oVendor.Value = "AAA" Then
invCharPosition = InStr(1, oPartNumber.Value, "-D")
invPartNumber = Mid(oPartNumber.Value, invCharPosition + 1, 4)
'write to the target cell
'oDetail.Value = invPartNumber
oItem.Value = invPartNumber
Else
Select Case CInt(oItem.Value)
Case Is < 10
oItem.Value = "000" & oItem.Value
Case Is < 100
oItem.Value = "00" & oItem.Value
Case Is < 1000
oItem.Value = "0" & oItem.Value
Case Else
End Select
End If
Next
End Sub