Thanks a lot again. The help was almost perfect.
The little issue was, I could not read the file name in the message box because full file name is too long. Therefore, I revised the code as shown below (mostly it is your code: Thanks):
I would like to ask, is it possible to increase the width of the message box?
Dim oChildren_in_Assy As New ArrayList
Dim FName_Children As New ArrayList 'FN: File Name
Dim openAssy As AssemblyDocument
openAssy = ThisApplication.ActiveDocument
Dim oChildDoc As Document
If openAssy.DocumentType = kAssemblyDocumentObject Then
For Each oChildDoc In openAssy.AllReferencedDocuments
oChildren_in_Assy.Add(oChildDoc.FullFileName)
FName_Pos = InStrRev(oChildDoc.FullFileName, "\", -1)
FName_Child = Right(oChildDoc.FullFileName, Len(oChildDoc.FullFileName) - FName_Pos)
FName_Children.Add(FName_Child)
Next oChildDoc
Child_Selected = InputListBox("SELECT SOURCE DOCUMENT", FName_Children, FName_Children(0), Title := "TO COPY PROPERTIES FROM", ListName := "REFERENCE DOCUMENTS")
' oIndex = FName_Children.IndexOf(Child_Selected)
iProperties.Value("Project", "Part Number") = oChildDoc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value
iProperties.Value("Project", "Description") = oChildDoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value
iProperties.Value("Custom", "TOTAL QTY") = oChildDoc.PropertySets.Item("User Defined Properties").Item("TOTAL QTY").Value
Else
MessageBox.Show("This document is not an assembly!", "INFORMATION")
End If
