1 Answers
A:
Add Same Description to All Files in a Folder
This macro:
Sample VBA Code
Sub AddDescriptionToAllPartsInFolder()
Dim folderPath As String
folderPath = InputBox("Enter the folder path containing .ipt files:")
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim file As Object
Dim partDoc As PartDocument
Dim descriptionText As String
descriptionText = InputBox("Enter the description to apply:")
If fso.FolderExists(folderPath) Then
For Each file In fso.GetFolder(folderPath).Files
If LCase(fso.GetExtensionName(file.Name)) = "ipt" Then
Set partDoc = ThisApplication.Documents.Open(file.Path, False)
partDoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value = descriptionText
partDoc.Save
partDoc.Close
End If
Next
MsgBox "Descriptions updated for all .ipt files in folder."
Else
MsgBox "Folder not found!"
End If
End Sub
Find the Best CAD Software
Explore all products with features, pricing, reviews and more
View All SoftwareHelp the community
Be the First to Answer these questions
Disclaimer
Techjockey’s software industry experts offer advice for educational and informational purposes only. A category or product query or issue posted, created, or compiled by Techjockey is not meant to replace your independent judgment.
20,000+ Software Listed
Best
Price Guaranteed
Free Expert
Consultation
2M+
Happy Customers