INCLUDETEXT inserting carriage return before and after data

E

eugene

Hi All,

I have a line in my document as below

sometext {INCLUDETEXT c:\\document.doc}

however when the INCLUDETEXT field activates I end up with

sometext CARRIAGERETURN
document.doc contents
CARRIAGERETURN

ie there is a carriage return before and after the content of the
INCLUDETEXT document is added.

Is this a base feature of this functionality or is there a way to get
the INCLUDETEXT content on the same line as my other text?

TIA
Eugene
 
W

Walter Briscoe

In message <[email protected]> of Mon, 22
Aug 2011 02:13:30 in microsoft.public.word.mailmerge.fields, eugene
Hi All,

I have a line in my document as below

sometext {INCLUDETEXT c:\\document.doc}

however when the INCLUDETEXT field activates I end up with

sometext CARRIAGERETURN
document.doc contents
CARRIAGERETURN

ie there is a carriage return before and after the content of the
INCLUDETEXT document is added.

Is this a base feature of this functionality or is there a way to get
the INCLUDETEXT content on the same line as my other text?

TIA
Eugene

I believe it is a "base feature of this functionality".
I surround inclusions in aaa which acts as a bracket.

I had a similar problem with lines of the following format
aaa{ if 1 = 1 { includetext "{ docvariable enclosures }" "{ mergefield fname }_2_1"}}aaa
[I transcribed that by hand; I must get a macro to do so. ;)]

which expand into
aaa
line 1
line 2
....
line n
aaa

I run a macro which does the mailmerge
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.DataSource.FirstRecord = 1
.DataSource.LastRecord = 1
.Execute Pause:=False
End With

and continues
With Selection
.Find.ClearFormatting
Do While .Find.Execute(FindText:="aaa?", MatchWildcards:=True, _
Format:=False)
.Delete Unit:=wdCharacter, Count:=1
Loop
End With

I need that logic as before I zap the aaa lines, I have
Table 1
aaa
Table 2
aaa
Table 3

In that context .Find.Execute( ..., ReplaceWith:="" ...) does not work.

After,
I end with
Table 1 & 2 & 3.
 
J

jds

eugene wrote on 08/22/2011 05:13 ET
Hi All

I have a line in my document as belo

sometext {INCLUDETEXT c:document.doc

however when the INCLUDETEXT field activates I end up wit

sometext CARRIAGERETUR
document.doc content
CARRIAGERETUR

ie there is a carriage return before and after the content of th
INCLUDETEXT document is added

Is this a base feature of this functionality or is there a way to ge
the INCLUDETEXT content on the same line as my other text

TI
Eugen
For Eugene
Ensure that when you select the text that you bookmark to use in th
INCLUDETEX
field, DO NOT select the carriage return at the end of the block of text.
Tha
is, the bookmark should EXCLUDE the last carriage return
Jay
 

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