# Export to MS Word - omitting variables

**URL:** <https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696>\
**Category:** Templates\
**Tags:** comments, input\_comment\
**Created:** [March 2, 2018, 10:17am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696 "2018-03-02T10:17:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 2, 2018, 10:17am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/1 "2018-03-02T10:17:00Z")

</div>

Hi,

Have a problem with the MS Word export of a text: I have the following code:

´´´Na het respecteren van een wachttermijn van {{vennootschap\_omvang\_wachtperiode\_jaren\_tekst}} jaar na aktedatum, betekent dit voor {% if company.custom.communication.level == ‘tutoyeren’ %}jou{% elsif company.custom.communication.level == ‘vousvoyeren’ %}u{% endif %} dat het bedrag van het kapitaal dat toen via kapitaalverhoging in de vennootschap werd ingebracht, nu belastingvrij uit de vennootschap uitgekeerd kan worden aan de {{shareholder\_type\_Plu}}.´´´

Now, when I look at the text itself, I get the following (which is correct):

Na het respecteren van een wachttermijn van vier jaar na aktedatum, betekent dit voor jou dat het bedrag van het kapitaal dat toen via kapitaalverhoging in de vennootschap werd ingebracht, nu belastingvrij uit de vennootschap uitgekeerd kan worden aan de vennoten.

The MS Word export gives me the following:

‘Na het respecteren van een wachttermijn van jaar na aktedatum, betekent dit voor jou dat het bedrag van het kapitaal dat toen via kapitaalverhoging in de vennootschap werd ingebracht, nu belastingvrij uit de vennootschap uitgekeerd kan worden aan de vennoten.’

In other words, the amount of years between ‘van’ en ‘jaar’ is blank, although the rest of the template is ok.

How come?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/jelle/32/246_2.png) [@Jelle](https://community.silverfin.com/u/Jelle)\
**Post date:** [March 2, 2018, 10:48am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/2 "2018-03-02T10:48:19Z")

</div>

Hi Bart,

Would it be possible to paste me the code in which {{vennootschap\_omvang\_wachtperiode\_jaren\_tekst}} is being assigned or captured?

I’ll have a look at why this part is not visible in your export.

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 2, 2018, 10:56am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/3 "2018-03-02T10:56:58Z")

</div>

Hi Jelle,

{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘[niet gedefinieerd]’ %}

As a plus, I’d like to have this text in bold. Do I put the \*\* outside or inside the '?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/jelle/32/246_2.png) [@Jelle](https://community.silverfin.com/u/Jelle)\
**Post date:** [March 2, 2018, 11:10am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/4 "2018-03-02T11:10:57Z")

</div>

Hi Bart,

Where exactly are the 4 years coming from then? Can you post the entire code?

To make the text bold, I would suggest to do it in the part of code where you’re using this variable:

`Na het respecteren van een wachttermijn van **{{vennootschap_omvang_wachtperiode_jaren_tekst}}** jaar na aktedatum, betekent dit voor {% if company.custom.communication.level == ‘tutoyeren’ %}jou{% elsif company.custom.communication.level == ‘vousvoyeren’ %}u{% endif %} dat het bedrag van het kapitaal dat toen via kapitaalverhoging in de vennootschap werd ingebracht, nu belastingvrij uit de vennootschap uitgekeerd kan worden aan de {{shareholder_type_Plu}}.`

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 2, 2018, 11:15am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/5 "2018-03-02T11:15:49Z")

</div>

Sorry my mistake:

´´´ {% if company.custom.corporatesize.var == ‘klein’ %}  
{% assign vennootschap\_wachtperiode\_dagen = 2 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = 4 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘vier’ %}  
{% elsif company.custom.corporatesize.var == ‘groot’ %}  
{% assign vennootschap\_wachtperiode\_dagen = 2 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = 8 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘acht’ %}  
{% else %}{% comment %}Dit is de standaardoptie{% endcomment %}  
{% assign vennootschap\_wachtperiode\_dagen = ‘niet gedefinieerd’ %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = ‘niet gedefinieerd’ %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘niet gedefinieerd’ %}  
{% endif %}  
´´´  
The whole code would be too long … several pages already

---

<div class="post-metadata">

**Author:** ![Jelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/jelle/32/246_2.png) [@Jelle](https://community.silverfin.com/u/Jelle)\
**Post date:** [March 2, 2018, 11:29am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/6 "2018-03-02T11:29:34Z")

</div>

No problem, Bart. Then we’ll get to the root of the issue step-by-step.  
In your above code, I don’t see any specific reason why this should not get exported.

So we’ll have to verify the check itself: company.custom.corporatesize.var.

Would you kindly post me the piece of code where this custom variable is being assigned?

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 2, 2018, 11:34am UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/7 "2018-03-02T11:34:27Z")

</div>

Code is {% input company.custom.corporatesize.var as:select options:‘niet gedefinieerd|klein|groot’ default:‘niet gedefinieerd’ %}

---

<div class="post-metadata">

**Author:** ![Jelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/jelle/32/246_2.png) [@Jelle](https://community.silverfin.com/u/Jelle)\
**Post date:** [March 2, 2018, 1:04pm UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/8 "2018-03-02T13:04:54Z")

</div>

Hi Bart,

Only one possible explanation for this kind of behaviour, is it possible your assigns are being done within {% ic %} {% endic %} tags?  
It’s adviced to do your assigns outside these tags, for example:  
{% ic %}  
{% input company.custom.corporatesize.var as:select options:‘niet gedefinieerd|klein|groot’ default:‘niet gedefinieerd’ %}  
{% endic %}

{% if company.custom.corporatesize.var == ‘klein’ %}  
{% assign vennootschap\_wachtperiode\_dagen = 2 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = 4 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘vier’ %}  
{% elsif company.custom.corporatesize.var == ‘groot’ %}  
{% assign vennootschap\_wachtperiode\_dagen = 2 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = 8 %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘acht’ %}  
{% else %}{% comment %}Dit is de standaardoptie{% endcomment %}  
{% assign vennootschap\_wachtperiode\_dagen = ‘niet gedefinieerd’ %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren = ‘niet gedefinieerd’ %}  
{% assign vennootschap\_omvang\_wachtperiode\_jaren\_tekst = ‘niet gedefinieerd’ %}  
{% endif %}

This way you should get the correct text when exporting it.

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 2, 2018, 3:41pm UTC](https://community.silverfin.com/t/export-to-ms-word-omitting-variables/696/9 "2018-03-02T15:41:34Z")

</div>

OK thanks … problem solved! Have a great weekend!
