This gives up: INCLUDETEXT "File.doc" {IF cond BkMrk1 BkMrk1}

A

Avi

Hi all,

I used {INCLUDETEXT} and {IF} fields to implement some type of basic
conditional text in Word.

It was working fine for a while: I was defining "resource texts" in a
resource file and marking them with bookmarks, and including them into my
main (target) doc using the following type of field

INCLUDETEXT "File.doc" {IF cond BkMrk1 BkMrk_Empty}

(with the help of a guy on this list called Peter Jamieson).

So I had about 7 pages of bookmarked blocks of text, and as said, it was
going well, and then at some point the target doc would not recognize any
further bookmarks that I defined in the resource document. Sure it finds the
file resource ok; the earlier INCLUDEs from the same file all still work. So
I am sitting here eyeballing the bookmark names trying to see what's wrong,
and of course I know nothing is wrong coz I created the bookmark names and
copied them into the field by copy-paste. This is one more of those bugs that
just can't be.

Any ideas anybody?

tia

- avi
 
M

macropod

Hi Avi,

Is the INCLUDETEXT field returning an error message? If so, what is it?

Cheers

--
macropod
[MVP - Microsoft Word]


| Hi all,
|
| I used {INCLUDETEXT} and {IF} fields to implement some type of basic
| conditional text in Word.
|
| It was working fine for a while: I was defining "resource texts" in a
| resource file and marking them with bookmarks, and including them into my
| main (target) doc using the following type of field
|
| INCLUDETEXT "File.doc" {IF cond BkMrk1 BkMrk_Empty}
|
| (with the help of a guy on this list called Peter Jamieson).
|
| So I had about 7 pages of bookmarked blocks of text, and as said, it was
| going well, and then at some point the target doc would not recognize any
| further bookmarks that I defined in the resource document. Sure it finds the
| file resource ok; the earlier INCLUDEs from the same file all still work. So
| I am sitting here eyeballing the bookmark names trying to see what's wrong,
| and of course I know nothing is wrong coz I created the bookmark names and
| copied them into the field by copy-paste. This is one more of those bugs
that
| just can't be.
|
| Any ideas anybody?
|
| tia
|
| - avi
|
 
A

Avi

It was just saying that it couldn't find the bookmark.

Ok, it has started working now. I can't think what I was doing wrong.
Problem with the nested fields is that when they get full/half executed, you
can't always see what the original fields are.

Thanks.

- avi
 
P

Peter Jamieson

Sometimes when debugging I find it necessary to select each nested field in
turn, right-click and select the "toogle Field codes" option, so that I can
see the current result of that single field.

In my experience the single most common accidental error when using
INCLUDETEXT fields is inserting additional spaces that cause the path to
evaluate incorrectly, particularly when you construct the field codes using
cut-and-paste.

Peter Jamieson
Avi said:
It was just saying that it couldn't find the bookmark.

Ok, it has started working now. I can't think what I was doing wrong.
Problem with the nested fields is that when they get full/half executed,
you
can't always see what the original fields are.

Thanks.

- avi

macropod said:
Hi Avi,

Is the INCLUDETEXT field returning an error message? If so, what is it?

Cheers

--
macropod
[MVP - Microsoft Word]


| Hi all,
|
| I used {INCLUDETEXT} and {IF} fields to implement some type of basic
| conditional text in Word.
|
| It was working fine for a while: I was defining "resource texts" in a
| resource file and marking them with bookmarks, and including them into
my
| main (target) doc using the following type of field
|
| INCLUDETEXT "File.doc" {IF cond BkMrk1 BkMrk_Empty}
|
| (with the help of a guy on this list called Peter Jamieson).
|
| So I had about 7 pages of bookmarked blocks of text, and as said, it
was
| going well, and then at some point the target doc would not recognize
any
| further bookmarks that I defined in the resource document. Sure it
finds the
| file resource ok; the earlier INCLUDEs from the same file all still
work. So
| I am sitting here eyeballing the bookmark names trying to see what's
wrong,
| and of course I know nothing is wrong coz I created the bookmark names
and
| copied them into the field by copy-paste. This is one more of those
bugs
that
| just can't be.
|
| Any ideas anybody?
|
| tia
|
| - avi
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top