View Single Post
 
Old 06-02-2021, 03:19 PM
Endeavor Endeavor is offline Windows 7 64bit Office 97-2003
Novice
 
Join Date: Jun 2021
Posts: 1
Endeavor is on a distinguished road
Default If-Then Field Bug in newer versions of Word?

Hi everyone,

If i use a field that looks like this:

{ IF "A" = "A" "{INCLUDETEXT "{FILENAME \p }\\..\\00data\\00DataFile.doc" BookmarkName \!}" "No." }

In MS Word 2002, it works just fine. BookmarkName is taken from the 00data\00DataFile.doc and displayed in the appropriate place.

But, if I use it in newer version of MS Word (including the latest version), I get an error message:

"Error! Cannot open file."

What's weird is that the part that is failing, e.g.,

{INCLUDETEXT "{FILENAME \p }\\..\\00data\\00DataFile.doc" BookmarkName \!}

works just fine if it is a standalone field in all versions of Word. It even works just fine if I use it as expression1 or expression2 in the IF field. It only doesn't work if I use it as the truetext or the falsetext in the IF field, and then only in the newer versions of MS Word.

Can anyone give me any suggestions as to why this isn't working, and any work around that I might try to achieve the same result?
Reply With Quote