Docx and HTML issues

Hi,

I am trying using power automate to "Create DOCX document from template". I have a docx that looks like this:

{{FirstName}:html} {{LastName}:html} {{MiddleName}:html} {{FatherName}:html} {{MotherName}:html} {{MaiddenName}:html} {{DOB}:html} {{PlaceofBirth}:html} {{PESEL}:html} {{Nationality}:html}

The template data is like this:

But the result is as follow.

Obywatelstwo: Polskie
PESEL: 1122334455666
Miejsce urodzenia: Koszalin
Data urodzenia: 1900-01-01
Imię ojca: Janusz
Imię matki: Ewa
Drugie imie: Piotr
Nazwisko: Doe
Imię: John

The order from the document is not kept.

Hello @Sebski,

I tried to reproduce it with my docx template but it works ok, the initial order in the document is kept.

Please share your docx sample and copy the JSON so I can try to reproduce it with your documents.

Best regards,
Petr
Plumsail team

Hi @Petr

Attached all 3 documents, the input file, the result file and the JSON.

json.txt (1.7 KB) DataChange.docx (90.8 KB) Kwestionariusz Osoboty.docx (95.7 KB)

Hi @Sebski,

It could be fixed if youplace the tags in a column. I attached the corrected document.

Kwestionariusz Osoboty.docx (95.9 KB)

Best regards,
Petr
Plumsail team

Hi @Petr

That works, the reason I have this in all 1 line is that the result is like this:


It adds a new line between each rows.
That's why I did put it that way.

When I put it in an array like this I have the same issue.

Finally when you put the html tag in a sentence for example

The template: image
The result is like this
image

The reason I use the html tag is to format the data.

Hi @Sebski,

Unfortunately the issue is nown and the order is not kept when you place it as you described initially.
We 're working on a fix but I can't say the due date.

I guess it adds the extra line because of the

tag in the source HTML?

Best regards,
Petr
Plumsail team

Thanks,

Is there another way to format the text other than html?

Hi @Sebski,

What if the format will be done in the docx template itself?

For example, place the tags into a tbale, make the table cells borders invisible.

How do you think?

Best regards,
Petr
Plumsail team