Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
sdjwalls sdjwalls is offline
external usenet poster
 
Posts: 2
Default Embedding INCLUDETEXT in an IF changes styles

Hello,

I have a document that needs to pull in other documents based off of what is
in the Subject Document Property, and also have the Table of Contents and
List of Tables update properly (several headings and tables get included with
the inserted document).

If I use just the INCLUDETEXT on its own, it seems to work pretty well...the
doc is inserted, the headings styles look correct, and the TOC and LOT update
properly. My field:

{ INCLUDETEXT "BASE.doc" }

The proper TOC looks similar to:

1.1 Introduction ... 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

However, if I put this INCLUDETEXT inside an IF statement, then things go
awry. The first heading in the included doc doesn't come out right, but next
heading in the included doc seems all right? The added tables do not show up
in the LOT at all when updated. And the TOC is very strange...where the
messed up heading occurred, I have something similar to:

{ if { DOCPROPERTY "Subject" } = "BASE" { INCLUDETEXT "BASE.doc" } }

1.1 Introduction ... 7
1.1 .......... 7
1.1 .......... 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

Beside the fact that this looks odd (should look like example above, w/out
the IF), it doesn't match what the doc is actually showing.

Help is greatly appreciated! This would be wonderful it would actually work!

I saw similar posts, and tried several variations, but didn't find anything
that really matched this (or worked).

Thanks,
SDJWalls
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Embedding INCLUDETEXT in an IF changes styles

Hi sdjwalls,

What Style is applied to the paragraph the IF field is attached to?

A slightly different approach you could take, which avoids the IF field altogether, is to use the DOCPROPERTY field in your target
document to refer to different bookmarked ranges in your source document (meaning you'd only need one source document for all the
variable boilerplate text) and code the INCLUDETEXT field along the lines of:
{ INCLUDETEXT "filepath//REFERENCE.doc" { DOCPROPERTY "Subject" } }
With this approach, if your source document has a bookmarked range named 'base' and the target document has a DOCPROPERTY "Subject"
set to 'Base', the corresponding text will be imported. For this to work, you'll need to have a default bookmark name (even if its
range is empty) in the source document for the DOCPROPERTY field to refer.


--
Cheers
macropod
[Microsoft MVP - Word]


"sdjwalls" wrote in message ...
Hello,

I have a document that needs to pull in other documents based off of what is
in the Subject Document Property, and also have the Table of Contents and
List of Tables update properly (several headings and tables get included with
the inserted document).

If I use just the INCLUDETEXT on its own, it seems to work pretty well...the
doc is inserted, the headings styles look correct, and the TOC and LOT update
properly. My field:

{ INCLUDETEXT "BASE.doc" }

The proper TOC looks similar to:

1.1 Introduction ... 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

However, if I put this INCLUDETEXT inside an IF statement, then things go
awry. The first heading in the included doc doesn't come out right, but next
heading in the included doc seems all right? The added tables do not show up
in the LOT at all when updated. And the TOC is very strange...where the
messed up heading occurred, I have something similar to:

{ if { DOCPROPERTY "Subject" } = "BASE" { INCLUDETEXT "BASE.doc" } }

1.1 Introduction ... 7
1.1 .......... 7
1.1 .......... 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

Beside the fact that this looks odd (should look like example above, w/out
the IF), it doesn't match what the doc is actually showing.

Help is greatly appreciated! This would be wonderful it would actually work!

I saw similar posts, and tried several variations, but didn't find anything
that really matched this (or worked).

Thanks,
SDJWalls


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
sdjwalls sdjwalls is offline
external usenet poster
 
Posts: 2
Default Embedding INCLUDETEXT in an IF changes styles

Hi macropod,

Thank you so much! By changing the problem around like that, it works very
well. I've concatenated my source files and added bookmarks, and it works
very well. Everything updates nicely, without styles getting scrambled. A
workable work-around.

To answer your question, the source docs had a variety of styles. Different
headings, body, etc. I had tried setting the style of the field itself, but
then when the field was updated, everything imported had that same style
without any variation--too flat.

So, does this imply that IF really has problems? Seems fine for straight
text, but nothing more involved than that?

Again-many thanks.
sdjwalls

"macropod" wrote:

Hi sdjwalls,

What Style is applied to the paragraph the IF field is attached to?

A slightly different approach you could take, which avoids the IF field altogether, is to use the DOCPROPERTY field in your target
document to refer to different bookmarked ranges in your source document (meaning you'd only need one source document for all the
variable boilerplate text) and code the INCLUDETEXT field along the lines of:
{ INCLUDETEXT "filepath//REFERENCE.doc" { DOCPROPERTY "Subject" } }
With this approach, if your source document has a bookmarked range named 'base' and the target document has a DOCPROPERTY "Subject"
set to 'Base', the corresponding text will be imported. For this to work, you'll need to have a default bookmark name (even if its
range is empty) in the source document for the DOCPROPERTY field to refer.


--
Cheers
macropod
[Microsoft MVP - Word]


"sdjwalls" wrote in message ...
Hello,

I have a document that needs to pull in other documents based off of what is
in the Subject Document Property, and also have the Table of Contents and
List of Tables update properly (several headings and tables get included with
the inserted document).

If I use just the INCLUDETEXT on its own, it seems to work pretty well...the
doc is inserted, the headings styles look correct, and the TOC and LOT update
properly. My field:

{ INCLUDETEXT "BASE.doc" }

The proper TOC looks similar to:

1.1 Introduction ... 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

However, if I put this INCLUDETEXT inside an IF statement, then things go
awry. The first heading in the included doc doesn't come out right, but next
heading in the included doc seems all right? The added tables do not show up
in the LOT at all when updated. And the TOC is very strange...where the
messed up heading occurred, I have something similar to:

{ if { DOCPROPERTY "Subject" } = "BASE" { INCLUDETEXT "BASE.doc" } }

1.1 Introduction ... 7
1.1 .......... 7
1.1 .......... 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

Beside the fact that this looks odd (should look like example above, w/out
the IF), it doesn't match what the doc is actually showing.

Help is greatly appreciated! This would be wonderful it would actually work!

I saw similar posts, and tried several variations, but didn't find anything
that really matched this (or worked).

Thanks,
SDJWalls


.

  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Embedding INCLUDETEXT in an IF changes styles

Hi sdjwalls,

I don't believe it was the IF field, per se, that was the problem but, more likely, the Style of the paragraph you had it attached
to.

--
Cheers
macropod
[Microsoft MVP - Word]


"sdjwalls" wrote in message ...
Hi macropod,

Thank you so much! By changing the problem around like that, it works very
well. I've concatenated my source files and added bookmarks, and it works
very well. Everything updates nicely, without styles getting scrambled. A
workable work-around.

To answer your question, the source docs had a variety of styles. Different
headings, body, etc. I had tried setting the style of the field itself, but
then when the field was updated, everything imported had that same style
without any variation--too flat.

So, does this imply that IF really has problems? Seems fine for straight
text, but nothing more involved than that?

Again-many thanks.
sdjwalls

"macropod" wrote:

Hi sdjwalls,

What Style is applied to the paragraph the IF field is attached to?

A slightly different approach you could take, which avoids the IF field altogether, is to use the DOCPROPERTY field in your
target
document to refer to different bookmarked ranges in your source document (meaning you'd only need one source document for all the
variable boilerplate text) and code the INCLUDETEXT field along the lines of:
{ INCLUDETEXT "filepath//REFERENCE.doc" { DOCPROPERTY "Subject" } }
With this approach, if your source document has a bookmarked range named 'base' and the target document has a DOCPROPERTY
"Subject"
set to 'Base', the corresponding text will be imported. For this to work, you'll need to have a default bookmark name (even if
its
range is empty) in the source document for the DOCPROPERTY field to refer.


--
Cheers
macropod
[Microsoft MVP - Word]


"sdjwalls" wrote in message ...
Hello,

I have a document that needs to pull in other documents based off of what is
in the Subject Document Property, and also have the Table of Contents and
List of Tables update properly (several headings and tables get included with
the inserted document).

If I use just the INCLUDETEXT on its own, it seems to work pretty well...the
doc is inserted, the headings styles look correct, and the TOC and LOT update
properly. My field:

{ INCLUDETEXT "BASE.doc" }

The proper TOC looks similar to:

1.1 Introduction ... 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

However, if I put this INCLUDETEXT inside an IF statement, then things go
awry. The first heading in the included doc doesn't come out right, but next
heading in the included doc seems all right? The added tables do not show up
in the LOT at all when updated. And the TOC is very strange...where the
messed up heading occurred, I have something similar to:

{ if { DOCPROPERTY "Subject" } = "BASE" { INCLUDETEXT "BASE.doc" } }

1.1 Introduction ... 7
1.1 .......... 7
1.1 .......... 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.1.1 7
1.2 Base Config ..... 7
1.3 Base Config Desc ...8
1.3.1 Desc A ...8
1.3.2 Desc B ...9

Beside the fact that this looks odd (should look like example above, w/out
the IF), it doesn't match what the doc is actually showing.

Help is greatly appreciated! This would be wonderful it would actually work!

I saw similar posts, and tried several variations, but didn't find anything
that really matched this (or worked).

Thanks,
SDJWalls


.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
embedding jpgs Darryl[_2_] Microsoft Word Help 6 July 29th 08 05:34 AM
embedding a file mccauley Page Layout 0 May 2nd 08 05:58 PM
PDF embedding MA Microsoft Word Help 2 January 18th 08 04:44 AM
embedding fonts Wal Green Microsoft Word Help 1 May 1st 05 02:23 AM
Possible to {includetext} without taking on styles of target? boswrit Microsoft Word Help 2 April 1st 05 01:49 PM


All times are GMT +1. The time now is 02:52 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"