I open your sample file in Writer (because I have no Word)
I get Error: Reference source not found.
The Navigator (
F5 or sidepane) shows no bookmark, which is confirmed by looking at the bookmark dictionary with
The target bookmark is NG_MACRO. With such a name, you may have attempted to define the bookmark with a macro and the macro dictionary is also empty.
Macros will not be converted from .doc to Writer because the languages are not not the same.
If you’re looking for a workaround, edit your question to describe the intent of this bookmark reference (from a user point of view, i.e. it should echo such part of the document where the data is created in this way). Give the goal of the document and how you use it. This will help to understand your workflow and to suggest an alternative.
I more carefully had a look at the attached file with an hexadecimal editor. What we find in the binary .doc is something like
Date of call # REF NG_MACRO "STANDARD" "tc_date" # 08/02/2016 #
where I use
# to represent various binary bytes. The binary bytes are likely to be function encodings for the strings which follow. I am not familiar with DOC format but it is likely that the field/bookmark name is
NG_MACRO containing a value of type
"STANDARD" formatting. Last updated value is stored here as
08/02/2016 in case it is not available or not updated.
I opened the .doc file in Writer and saved it as .fodt. I examined the resulting XML with a text editor. The field is translated as:
<text:bookmark-ref text:reference-format="text" text:ref-name="NG_MACRO">Error: Reference source not found</text:bookmark-ref>
Note that it is considered as a bookmark. A cross-reference would have been translated as
text:reference-ref. The formatting code is not kept, nor the type. After all, a bookmark is a shortcut for a location in the document and can’t have a time value while a field can:
<text:date style:data-style-name="N37" text:date-value="2020-09-14T16:43:21.129685132" text:fixed="true">09/14/20</text:date>
In this example, note that type, formatting and last used value are clearly mentioned.
What I didn’t show is how a bookmark reference is translated in XML. An ODF reference to a bookmark doesn’t cache the bookmark target (why should it because the bookmark is supposed to be defined in the same document?)
My opinion is the original document erroneously used the bookmark feature for a field reference (such as current date of insertion, fixed = not updatable). Writer will not transform a bookmark ref into something else, even if DOC data may suggest otherwise to us humans.
Another possibility is the original file is incomplete: some part containing the bookmark is missing. Writer cannot regenerate the missing part. Who could?
It it opens correctly in Word, you should try to convert to PDF from Word itself. If you can’t do it from Word because it has no PDF export command, the workaround is to install a print-to-PDF printer driver. My Linux box has a generic “Print to File” driver which can print to a variety of formats, including PostScript and PDF. There is a trend presently for printers to adopt PDF as a native format. Consequently, most printer drivers also accept to generate PDF files. All you have to do is intercept the file in the queue before it is sent to the physical device.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.