Conditional Document Properties with bullet Points

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: 

  1. The properties should be listed among each other with enumeration style
  2. 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

Answer
Answer

Hi Suzanne, Thanks for your reply!
By "newline" I mean "pressing enter" (so a paragraph break?) and not "shift+enter" ( = line break)

I already tried both.

Using linebreaks the (exspected) result is

  • Textblock1
    Textblock2
    Textblock3

But what I need is:

  • Textblock1
  • Textblock2
  • Textblock3

So using Paragraph breaks should be the right direction?

But when I use the paragraph breaks and format the whole IF construction with List Style, the text is indented but the bullet Points are missing. I guess the paragraph break inside the if statement "eats" my paragraph style.

I read somewhere that in my case only character styles are applied and paragraph styles are not.

However I had a new idea this morning and it did the trick for me:

Instead of using Paragraph Breaks inside my IF Statements, I inserted a 1 x 1 table with invisible borders.

Additionaly I had to correct the row spacing between each table. But now everything is fine :)

I place to screens below. First before and second after manipulating row spacing:

And after manipulating row spacing:

Regards

Michael

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 207 Applies to: