[Solved] Field and variable wrong if exported to .doc

Using them, Making them, Finding them
Post Reply
piano1311
Posts: 68
Joined: Thu May 08, 2008 11:04 pm

[Solved] Field and variable wrong if exported to .doc

Post by piano1311 »

I habe a problem with oo 3.0.1 (XP Pro). I do not get help in my german forum. I hope my english is to be understand.

I make a letter-template:
Insert/Fields/Other
Variables
Set variable / Format=text / Name=Name1 / Not invisible
After insert and close I see a small gray mark at line 10 I choosed in the file.

On the same line again Insert/Fields/Other
Variables - Input field - I insert and close.

On line 15 Insert/Fields/Other
Variables - Show variable - I insert and close.
I close the file as template.

I open the template (File/New/templates in german: Datei/Neu/Vorlagen und Dokumente)

I am asked (In german Eingabefeld),
I write the word Germany

I see after OK
on line 10 = Germany
on line 15 = Germany
just as I wanted.

Now the problem is beginning

I save the file as Test1 and open Test1
I see in line 10 only the gray mark (and not more the word Germany)
I see in line 15 the word Germany (as wanted)

When I open the gray mark on line 10, I see the word Germany but not in the line.
I hope, anyone can understand my problem.
Thanks for help.

Greetings
piano1311
Attachments
Test-Spend-Auto.odt
Test-Spend-Auto.odt for the thread "Field and variable"
(7.34 KiB) Downloaded 323 times
Last edited by piano1311 on Sat Mar 21, 2009 4:15 pm, edited 3 times in total.
OOo 4.0.1 on Windows 8.1
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Field and variable

Post by Hagar Delest »

Do you save in native ODF format (.odt) the new files? Can you upload your template (see here: How to attach a document here)? NB: if .ott is not allowed, rename it as .odt.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
piano1311
Posts: 68
Joined: Thu May 08, 2008 11:04 pm

Re: Field and variable

Post by piano1311 »

Thanks
Hagar de l´Est,

I did edit my Thread. The origin file name was "Test-Spend-Auto.ott"
Greetings
piano1311
OOo 4.0.1 on Windows 8.1
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Field and variable

Post by Hagar Delest »

Hagar de l'Est wrote:Do you save in native ODF format (.odt) the new files?
It seems you save in .doc since it works fine with .odt and I can reproduce your problem if I save in .doc the file created from your template.

Remember that .doc was a closed and secret format until last year. Devs had to reverse engineer it to create the import/export filters. You can file a bug report if it hasn't been done yet: [Tutorial] Reporting bugs or suggestions.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
piano1311
Posts: 68
Joined: Thu May 08, 2008 11:04 pm

Re: Field and variable

Post by piano1311 »

Thanks Hagar de l'Est for the result.

The reason, I save in *.doc, is that in Germany much more persons work with Word than with OO. I have to change the produced files with this persons, as I work in a notpayed Job for handicaped persons. I save in *.doc (Writer) and *.xls (Calc).
So, saving as *.odt has a great disadvantage for us.

1. In the version older than OO 3.0.1 there was no problem with a template in this way and save as *.doc,
2. It is the first time, when I find such a great difference between Word and OO. I always spoke for OO, it was till this
situation for me full compatible with Word. But now?
3. How can I easy find, if a possible bug-message was made? I do not understand the special site.
4. I allow me the tip: If the result is really a bug in OO, is it not better, You (I mean the openofice.org Community Forum)
report this bug-message. I have no experience with bug-messages.

Many thanks again for the quick help,
piano1311
OOo 4.0.1 on Windows 8.1
piano1311
Posts: 68
Joined: Thu May 08, 2008 11:04 pm

Re: Field and variable

Post by piano1311 »

Hagar de l´Est,
now I understand another problem with *.doc files, I have since 2008:

My written template problem was with Input field, Set variable and Show variable.

But I have another template with Input field without Set variable and Show variable.

1. I save as Test1.doc
and open Test1.doc again: the content in the Input fields ist changed from Arial to Times New Roman.
Friends and I could not find why.

2. Today I save as Test1.odt
and open Test1.odt again: the content in the Input fields is Arial (no Change) !!!!

Now it is clear, that OO has "created" problems with doc, as You did write.
I am no friend from MS, but to leave "compatible" is not good.

Greetings again
piano1311
OOo 4.0.1 on Windows 8.1
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Field and variable

Post by Hagar Delest »

It seems that the 3.0.1 version has introduced several bugs in the .doc import/export filter, there are other threads with such issues. As a workaround, you can downgrade to 3.0.0.

As for using the .doc format, if the file has not to be edited, export as .pdf. Else, there is the ODF plugin for MS Office that allow Word to open ODF files. NB: the next MS Office version should support ODF. So .doc may be abandoned in the future.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
piano1311
Posts: 68
Joined: Thu May 08, 2008 11:04 pm

Re: Field and variable

Post by piano1311 »

Thanks Hagar de l´Est,

now looks the situation well.
I give the MS Office-Users the recommendation, to install the ODF plugin for MS Office
and I turn at once from saving in *.doc and *.xls both in *.odt.

No bug-report and we can keep our template-system.

Greetings
piano1311
OOo 4.0.1 on Windows 8.1
Post Reply