Here you go.
The Module Code is as follows -
********************************************************
Public Sub PropEdit()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
On Error Resume Next
If TypeOf ThisApplication.ActiveEditObject Is PlanarSketch Then
MsgBox "May not run in Sketch Mode, please return and run PropEditor"
Exit Sub
End If
If oDoc.DocumentType = kDrawingDocumentObject Then
MsgBox "Must be in an Assembly or Part Document to run the Property Editor!"
Exit Sub
End If
PropEditForm.Show vbModeless
End Sub
************************************************************
The form code looks like this -
************************************************************
Private Sub CancelBut_Click()
Unload Me
End Sub
Private Sub txtAssyDescription_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtAssyDescription.Text = UCase(txtAssyDescription.Text)
End Sub
Private Sub txtDesignedBy_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtDesignedBy.Text = UCase(txtDesignedBy.Text)
End Sub
Private Sub txtDrawingNumber_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtDrawingNumber.Text = UCase(txtDrawingNumber.Text)
End Sub
Private Sub txtDrawnBy_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtDrawnBy.Text = UCase(txtDrawnBy.Text)
End Sub
Private Sub txtMaterialDescription_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtMaterialDescription.Text = UCase(txtMaterialDescription.Text)
End Sub
Private Sub txtMFGPartNumber_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtMFGPartNumber.Text = UCase(txtMFGPartNumber.Text)
End Sub
Private Sub txtNotes_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtNotes.Text = UCase(txtNotes.Text)
End Sub
Private Sub txtPartNumber_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtPartNumber.Text = UCase(txtPartNumber.Text)
End Sub
Private Sub txtProject_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtProject.Text = UCase(txtProject.Text)
End Sub
Private Sub txtStockNumber_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtStockNumber.Text = UCase(txtStockNumber.Text)
End Sub
Private Sub txtTitle_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtTitle.Text = UCase(txtTitle.Text)
End Sub
Private Sub txtTitleLine1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtTitleLine1.Text = UCase(txtTitleLine1.Text)
End Sub
Private Sub txtTitleLine2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtTitleLine2.Text = UCase(txtTitleLine2.Text)
End Sub
Private Sub txtTitleLine3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtTitleLine3.Text = UCase(txtTitleLine3.Text)
End Sub
Private Sub txtVendor_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtVendor.Text = UCase(txtVendor.Text)
End Sub
Private Sub UserForm_Initialize()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveEditObject
On Error Resume Next
Dim oIVDesignInfo As PropertySet
Set oIVDesignInfo = oDoc.PropertySets.Item("Design Tracking Properties")
Dim oIVDocSumInfo As PropertySet
Set oIVDocSumInfo = oDoc.PropertySets.Item("Inventor Document Summary Information")
Dim oIVSumInfo As PropertySet
Set oIVSumInfo = oDoc.PropertySets.Item("Inventor Summary Information")
Dim oIVCustomSet As PropertySet
Set oIVCustomSet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Dim oIVPartNumber As Property
Set oIVPartNumber = oIVDesignInfo.Item("Part Number")
Dim oIVDrawingNumber As Property
Set oIVDrawingNumber = oIVDocSumInfo.Item("Category")
Dim oIVNotes As Property
Set oIVNotes = oIVSumInfo.Item("Comments")
Dim oIVMaterialDesc As Property
Set oIVMaterialDesc = oIVSumInfo.Item("Subject")
Dim oIVTitle As Property
Set oIVTitle = oIVSumInfo.Item("Title")
Dim oIVRev As Property
Set oIVRev = oIVSumInfo.Item("Revision Number")
Dim oIVProject As Property
Set oIVProject = oIVDesignInfo.Item("Project")
Dim oIVCkBy As Property
Set oIVCkBy = oIVDesignInfo.Item("Checked By")
Dim oIVCkDate As Property
Set oIVCkDate = oIVDesignInfo.Item("Date Checked")
Dim oIVEngBy As Property
Set oIVEngBy = oIVDesignInfo.Item("Engr Approved By")
Dim oIVDateEng As Property
Set oIVDateEng = oIVDesignInfo.Item("Engr Date Approved")
Dim oIVMFGPN As Property
Set oIVMFGPN = oIVDesignInfo.Item("Catalog Web Link")
Dim oIVAssyDesc As Property
Set oIVAssyDesc = oIVDesignInfo.Item("Description")
Dim oIVVendor As Property
Set oIVVendor = oIVDesignInfo.Item("Vendor")
Dim oIVStN As Property
Set oIVStN = oIVDesignInfo.Item("Stock Number")
Dim oStrTL1 As Double
oStrTL1 = String(0, "TL1")
Dim oIVTL1 As Property
Set oIVTL1 = oIVCustomSet.Item("Description 1")
If Err.Number <> 0 Then
Call oIVCustomSet.Add(oStrTL1, "Description 1")
End If
Dim oStrTL2 As Double
oStrTL2 = String(0, "TL2")
Dim oIVTL2 As Property
Set oIVTL2 = oIVCustomSet.Item("Description 2")
If Err.Number <> 0 Then
Call oIVCustomSet.Add(oStrTL2, "Description 2")
End If
Dim oStrTL3 As Double
oStrTL3 = String(0, "TL3")
Dim oIVTL3 As Property
Set oIVTL3 = oIVCustomSet.Item("Description 3")
If Err.Number <> 0 Then
Call oIVCustomSet.Add(oStrTL3, "Description 3")
End If
Me.txtPartNumber.Text = oIVPartNumber.Value
Me.txtDrawingNumber.Text = oIVDrawingNumber.Value
Me.txtNotes.Text = oIVNotes.Value
Me.txtMaterialDescription = oIVMaterialDesc.Value
Me.txtTitle = oIVTitle.Value
Me.txtRevisionNumber = oIVRev.Value
Me.txtProject = oIVProject.Value
Me.txtDrawnBy = oIVCkBy.Value
Me.txtDateDrawn = oIVCkDate.Value
Me.txtDesignedBy = oIVEngBy.Value
Me.txtDateDesigned = oIVDateEng.Value
Me.txtMFGPartNumber = oIVMFGPN.Value
Me.txtAssyDescription = oIVAssyDesc.Value
Me.txtVendor = oIVVendor.Value
Me.txtStockNumber = oIVStN.Value
Me.txtTitleLine1 = oIVTL1.Value
Me.txtTitleLine2 = oIVTL2.Value
Me.txtTitleLine3 = oIVTL3.Value
End Sub
Private Sub Concatenate_Click()
Me.txtNotes.Value = Me.txtTitleLine1 & " " & Me.txtTitleLine2 & " " & Me.txtTitleLine3
End Sub
Private Sub Today_Click()
Me.txtDateDrawn.Value = Now()
End Sub
Private Sub Today2_Click()
Me.txtDateDesigned.Value = Now()
End Sub
Private Sub AllpyBut_Click()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveEditObject
Dim oIVDesignInfo As PropertySet
Set oIVDesignInfo = oDoc.PropertySets.Item("Design Tracking Properties")
Dim oIVDocSumInfo As PropertySet
Set oIVDocSumInfo = oDoc.PropertySets.Item("Inventor Document Summary Information")
Dim oIVSumInfo As PropertySet
Set oIVSumInfo = oDoc.PropertySets.Item("Inventor Summary Information")
Dim oIVCustomSet As PropertySet
Set oIVCustomSet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Dim oIVPartNumber As Property
Set oIVPartNumber = oIVDesignInfo.Item("Part Number")
Dim oIVDrawingNumber As Property
Set oIVDrawingNumber = oIVDocSumInfo.Item("Category")
Dim oIVNotes As Property
Set oIVNotes = oIVSumInfo.Item("Comments")
Dim oIVMaterialDesc As Property
Set oIVMaterialDesc = oIVSumInfo.Item("Subject")
Dim oIVTitle As Property
Set oIVTitle = oIVSumInfo.Item("Title")
Dim oIVRev As Property
Set oIVRev = oIVSumInfo.Item("Revision Number")
Dim oIVProject As Property
Set oIVProject = oIVDesignInfo.Item("Project")
Dim oIVCkBy As Property
Set oIVCkBy = oIVDesignInfo.Item("Checked By")
Dim oIVCkDate As Property
Set oIVCkDate = oIVDesignInfo.Item("Date Checked")
Dim oIVEngBy As Property
Set oIVEngBy = oIVDesignInfo.Item("Engr Approved By")
Dim oIVDateEng As Property
Set oIVDateEng = oIVDesignInfo.Item("Engr Date Approved")
Dim oIVMFGPN As Property
Set oIVMFGPN = oIVDesignInfo.Item("Catalog Web Link")
Dim oIVAssyDesc As Property
Set oIVAssyDesc = oIVDesignInfo.Item("Description")
Dim oIVVendor As Property
Set oIVVendor = oIVDesignInfo.Item("Vendor")
Dim oIVStN As Property
Set oIVStN = oIVDesignInfo.Item("Stock Number")
Dim oIVTL1 As Property
Set oIVTL1 = oIVCustomSet.Item("Description 1")
Dim oIVTL2 As Property
Set oIVTL2 = oIVCustomSet.Item("Description 2")
Dim oIVTL3 As Property
Set oIVTL3 = oIVCustomSet.Item("Description 3")
oIVPartNumber.Value = Me.txtPartNumber.Value
oIVDrawingNumber.Value = Me.txtDrawingNumber.Value
oIVNotes.Value = Me.txtNotes.Value
oIVMaterialDesc.Value = Me.txtMaterialDescription.Value
oIVTitle.Value = Me.txtTitle.Value
oIVRev.Value = Me.txtRevisionNumber.Value
oIVProject.Value = Me.txtProject.Value
oIVCkBy.Value = Me.txtDrawnBy.Value
oIVCkDate.Value = Me.txtDateDrawn.Value
oIVEngBy.Value = Me.txtDesignedBy.Value
oIVDateEng.Value = Me.txtDateDesigned.Value
oIVMFGPN.Value = Me.txtMFGPartNumber.Value
oIVAssyDesc.Value = Me.txtAssyDescription.Value
oIVVendor.Value = Me.txtVendor.Value
oIVStN.Value = Me.txtStockNumber.Value
oIVTL1.Value = Me.txtTitleLine1.Value
oIVTL2.Value = Me.txtTitleLine2.Value
oIVTL3.Value = Me.txtTitleLine3.Value
End Sub
Private Sub OKBut_Click()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveEditObject
Dim oIVDesignInfo As PropertySet
Set oIVDesignInfo = oDoc.PropertySets.Item("Design Tracking Properties")
Dim oIVDocSumInfo As PropertySet
Set oIVDocSumInfo = oDoc.PropertySets.Item("Inventor Document Summary Information")
Dim oIVSumInfo As PropertySet
Set oIVSumInfo = oDoc.PropertySets.Item("Inventor Summary Information")
Dim oIVCustomSet As PropertySet
Set oIVCustomSet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Dim oIVPartNumber As Property
Set oIVPartNumber = oIVDesignInfo.Item("Part Number")
Dim oIVDrawingNumber As Property
Set oIVDrawingNumber = oIVDocSumInfo.Item("Category")
Dim oIVNotes As Property
Set oIVNotes = oIVSumInfo.Item("Comments")
Dim oIVMaterialDesc As Property
Set oIVMaterialDesc = oIVSumInfo.Item("Subject")
Dim oIVTitle As Property
Set oIVTitle = oIVSumInfo.Item("Title")
Dim oIVRev As Property
Set oIVRev = oIVSumInfo.Item("Revision Number")
Dim oIVProject As Property
Set oIVProject = oIVDesignInfo.Item("Project")
Dim oIVCkBy As Property
Set oIVCkBy = oIVDesignInfo.Item("Checked By")
Dim oIVCkDate As Property
Set oIVCkDate = oIVDesignInfo.Item("Date Checked")
Dim oIVEngBy As Property
Set oIVEngBy = oIVDesignInfo.Item("Engr Approved By")
Dim oIVDateEng As Property
Set oIVDateEng = oIVDesignInfo.Item("Engr Date Approved")
Dim oIVMFGPN As Property
Set oIVMFGPN = oIVDesignInfo.Item("Catalog Web Link")
Dim oIVAssyDesc As Property
Set oIVAssyDesc = oIVDesignInfo.Item("Description")
Dim oIVVendor As Property
Set oIVVendor = oIVDesignInfo.Item("Vendor")
Dim oIVStN As Property
Set oIVStN = oIVDesignInfo.Item("Stock Number")
Dim oIVTL1 As Property
Set oIVTL1 = oIVCustomSet.Item("Description 1")
Dim oIVTL2 As Property
Set oIVTL2 = oIVCustomSet.Item("Description 2")
Dim oIVTL3 As Property
Set oIVTL3 = oIVCustomSet.Item("Description 3")
If Me.txtTitleLine1.Value = Empty Then
MsgBox "Title Line 1 Field Must Be Populated"
Exit Sub
End If
If Me.txtTitleLine2.Value = Empty Then
MsgBox "Title Line 2 Field Must Be Populated"
Exit Sub
End If
If Me.txtNotes.Value = Empty Then
MsgBox "Notes Field Must Be Populated"
Exit Sub
End If
If Me.txtStockNumber.Value = Empty Then
MsgBox "Stock Number Field Must Be Populated"
Exit Sub
End If
If Me.txtVendor.Value = Empty Then
MsgBox "Vendor Field Must Be Populated"
Exit Sub
End If
If Me.txtMFGPartNumber.Value = Empty Then
MsgBox "MFG PN Field Must Be Populated"
Exit Sub
End If
oIVPartNumber.Value = Me.txtPartNumber.Value
oIVDrawingNumber.Value = Me.txtDrawingNumber.Value
oIVNotes.Value = Me.txtNotes.Value
oIVMaterialDesc.Value = Me.txtMaterialDescription.Value
oIVTitle.Value = Me.txtTitle.Value
oIVRev.Value = Me.txtRevisionNumber.Value
oIVProject.Value = Me.txtProject.Value
oIVCkBy.Value = Me.txtDrawnBy.Value
oIVCkDate.Value = Me.txtDateDrawn.Value
oIVEngBy.Value = Me.txtDesignedBy.Value
oIVDateEng.Value = Me.txtDateDesigned.Value
oIVMFGPN.Value = Me.txtMFGPartNumber.Value
oIVAssyDesc.Value = Me.txtAssyDescription.Value
oIVVendor.Value = Me.txtVendor.Value
oIVStN.Value = Me.txtStockNumber.Value
oIVTL1.Value = Me.txtTitleLine1.Value
oIVTL2.Value = Me.txtTitleLine2.Value
oIVTL3.Value = Me.txtTitleLine3.Value
Unload Me
End Sub
***********************************************************