Changing Value for $TITLE field

I have documents that the user can make inactive and this is the code I currently use to change the name of the value for the “Form” field.

If (LetterDoc.Form(0) = “VIOLATION LETTER v3”) Then

If (LetterDoc.InspReport(0) = inspReport(0)) Then

LetterDoc.ReplaceItemValue"InActDate",CurrentDate

LetterDoc.Form = “INACTIVE Violation Letter v3”

LetterDoc.Save True, True

End If

End If

I know have a new version of the letter and I use the option to Store Form in Document and of course it saves the name of the form in a hidden value called $TITLE. I have found formula that will change the name, but nothing using Script. Please help!!!

Subject: Changing Value for $TITLE field

Try placing a “~” in front of the $TITLE. For example:

LetterDoc.~$TITLE = “NewValue”

Subject: RE: Changing Value for $TITLE field

Thanks a lot.

Subject: RE: Changing Value for $TITLE field

Now I am getting a type mismatch after I made the change.

Subject: RE: Changing Value for $TITLE field

What is the $TITLE field type? What is the code you’re using to change the field?

Subject: RE: Changing Value for $TITLE field

I figured it out. Thanks though. I simply forgot to put (0) in the code.