Hi everyone,
I've got a little problem in Word, which is driving me nuts.
Already searched in the web, but could not find anything that matches my situation:
I have a word document with a bunch of document properties. Those properties are connected to fields within a SharePoint Document library.
There are about a dozen fields, which are optional: so they may or may not contain any content.
Now I want to include those fields into my document with two requirements:
- The properties should be listed among each other with enumeration style
- Because the properties are optional, they should be shown if and only if they are not empty
I'll call those fields Textblock1, Textblock2,...
So what I tried so far is the following:
{IF "[Textblock1]" <> "[Textblock1]" "[Textblock1]" ""}{IF "[Textblock2]" <> "[Textblock2]" "[Textblock2]" ""}{IF "[Textblock3]" <> "[Textblock3]" "
[Textblock3]" ""}{IF "[Textblock4]" <> "[Textblock4]" "
[Textblock4]" ""}
Where the newlines (CR+LF) are indeed included in my contentcontrols!
(Just for understanding: The If statement compares the documentproperty-control with a string value, named as the documentproperty, to verify whether or not the property is empty. I marked every control Bold and every String Italic)
This works fine so far, BUT I dont get any paragraph styles (including enmueration) applied to my content controls.
I'm quite sure, this is because of the newline inside the formulas.
So my question is: Has anyone an idea to get this working or a diffrent approach to reach the goal?
Kind regards
Michael