This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Make empty lines disappear

Hello all,

I am facing an issue during the creation of a word template. More specifically, I have put lots of properties (each one at a different line) in my template which may have a text value (created through VB script written on the property) according to the choices that were made at metadata card. Otherwise they remain empty. As a result, I would like not to have an empty line created, when these properties remain empty. I tried to write some code in my properties (I am using Microsoft Word 2016), for example:

{ IF "[Group Rates (Description)]" <> "Σφάλμα! Άγνωστο όνομα ιδιότητας εγγράφου" "[Group Rates (Description)]" "" }

but the problem remains. Do you have any idea in order to achieve the appropriate result?

Parents
  • Hey there,

    Based on your description I think i have an answer for you.  When multiple fields are being considered for a single space within a template sometimes it makes sense to perform the consolidation of these fields within M-Files as a secondary property field and map the template to that field rather than the primary set of fields.  This points the template to a single source of content rather than the multiple options a user may be choosing to populate.  Implementing a vb script on the secondary field would provide automation to collate the content together if multiple fields were populated or simply be populated with a singular property's content if only one field had content.  Ultimately if none of the fields had content you would likely still be left with a blank space on your template but with this approach your template would only have a single blank rather than however many you have currently.  I hope this helps!

    Tom

Reply
  • Hey there,

    Based on your description I think i have an answer for you.  When multiple fields are being considered for a single space within a template sometimes it makes sense to perform the consolidation of these fields within M-Files as a secondary property field and map the template to that field rather than the primary set of fields.  This points the template to a single source of content rather than the multiple options a user may be choosing to populate.  Implementing a vb script on the secondary field would provide automation to collate the content together if multiple fields were populated or simply be populated with a singular property's content if only one field had content.  Ultimately if none of the fields had content you would likely still be left with a blank space on your template but with this approach your template would only have a single blank rather than however many you have currently.  I hope this helps!

    Tom

Children
No Data