Here's what I got working. I pulled all of the properties in the current file, then did an if then else compare to the properties I wanted. Then deleted whatever was left over than the ones I wanted added with the last 2 lines of the If chain (greater & less than null). And the Ucase function as setup below works fine. Just have to put it during the call, and before the set to force it to come in uppercase, and to save uppercase.
********************************************
Option Compare Text ' Sets all string comparisons to be case insensitive
' Get custom properties CustomCount = CurrentDoc.GetCustomInfoCount2("") CustomNames = CurrentDoc.GetCustomInfoNames2("")
For j = 0 To CustomCount - 1 CustomName = CustomNames(j)
If StrComp(CustomNames(j), "DateCompleted") = 0 Then CheckDateCompleted = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current completed date ElseIf StrComp(CustomNames(j), "Material") = 0 Then CheckMaterial = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current material ElseIf StrComp(CustomNames(j), "PartShtSize") = 0 Then CheckPartShtSize = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current sheet size ElseIf StrComp(CustomNames(j), "PartBase") = 0 Then CheckPartBase = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current base # ElseIf StrComp(CustomNames(j), "Description") = 0 Then CheckDescription = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current description ElseIf StrComp(CustomNames(j), "DrawnBy") = 0 Then CheckDrawnBy = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current detailer ElseIf StrComp(CustomNames(j), "DesignedBy") = 0 Then CheckDesignedBy = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current designer ElseIf StrComp(CustomNames(j), "CheckedBy") = 0 Then CheckCheckedBy = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current checker ElseIf StrComp(CustomNames(j), "Revision") = 0 Then CheckRevision = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current revision ElseIf StrComp(CustomNames(j), "Finish") = 0 Then CheckFinish = CurrentDoc.CustomInfo2("", CustomNames(j)) ' get current finish ElseIf StrComp(CustomNames(j), "DrawingSize") = 0 Then FieldType = CurrentDoc.DeleteCustomInfo(CustomNames(j)) ' delete DrawingSize property ElseIf StrComp(CustomNames(j), "PartNo") = 0 Then FieldType = CurrentDoc.DeleteCustomInfo(CustomNames(j)) ' delete PartNo property ElseIf StrComp(CustomNames(j), "") = 1 Then FieldType = CurrentDoc.DeleteCustomInfo(CustomNames(j)) ' delete All other properties ElseIf StrComp(CustomNames(j), "") = -1 Then FieldType = CurrentDoc.DeleteCustomInfo(CustomNames(j)) ' delete All other properties End If Next j
' Force Properties to Uppercase CheckDateCompleted = UCase(CheckDateCompleted) CheckMaterial = UCase(CheckMaterial) CheckPartShtSize = UCase(CheckPartShtSize) CheckPartBase = UCase(CheckPartBase) CheckDescription = UCase(CheckDescription) CheckDrawnBy = UCase(CheckDrawnBy) CheckDesignedBy = UCase(CheckDesignedBy) CheckCheckedBy = UCase(CheckCheckedBy) CheckRevision = UCase(CheckRevision) CheckFinish = UCase(CheckFinish)
***********************************************************************