PDA

View Full Version : {includetext] help?



simoncarter
03-09-2007, 06:43 AM
Hello,

I have written a documnet which updates its fields from a external txt file.

Example
'The {includetext "c:\temp.txt" \ *mergeformat} and blah blah'

When I update the field above, it puts a hard carrage return before the and blah blah bit

Does anyone know how to stop it doing this?

I want the sentance to update without the hard carrage return being put in the middle of the sentance.

The temp.txt file has no extra lines in, its just one word.

lucas
03-09-2007, 08:31 AM
Hard to tell without knowing how your inserting it......not mindreaders ya know. Post your file.

Norie
03-09-2007, 09:13 AM
Perhaps it's the data that's the problem?

fumei
03-09-2007, 09:15 AM
The file c:\temp.txt has a paragraph mark at the end. As they all do, as far as Word is concerned.

You are not including text with this...you are including a file.

Even a single word has a paragraph mark at the end of the file.

Sorry, but there is no way out of this. ALL files brought in as files with INCLUDETEXT will have a paragraph mark at the end.

Unfortunately, if it IS a plain text file, you can not make a bookmark of the word. Other wise, you could use:

INCLUDETEXT "c:\temp.doc" "bookmark" \* MERGEFORMAT

Then only what is in the bookmark will be brought in.

If it is a file with no bookmark specified, you will always get a paragraph mark.

I want the sentance to update without the hard carrage return being put in the middle of the sentance.It can not be done without using a bookmark.