- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to create an User parameter (named "Comments") and then set it as the existing iProperty Comments from summary tab.
I have the following code:
SyntaxEditor Code Snippet
oMyParameter = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters Dim userParams As UserParameters = oMyParameter 'ADD COMMENTS Try parametro = ThisApplication.ActiveDocument.ComponentDefinition.Parameters("Comments") Catch Dim newParam As UserParameter = oMyParameter.AddByValue("Comments", "", UnitsTypeEnum.kTextUnits) End Try iProperties.Value("Summary", "Comments") = Comments
It checks if there is a user parameter named "Comments" and if not, it adds it with an empty text value.
The problem is, it seems to be stopping there. It sets the empty value and it stays that way.
And when I try to fill the comment property from a form, it doesn't work. It fills the user parameter but the ipropery comment stays empty.
The
iProperties.Value("Summary", "Comments") = Comments
works without the rest of the code of course if the user parameter pre-exists.
What I think happens is that when I create the Comments parameter and give it an empty value it stays as empty and ignores the rest.
Also in the form the text is already multi line.
Any ideas how to solve that would be appreciated!!
Solved! Go to Solution.