Consulting

Results 1 to 4 of 4

Thread: {includetext] help?

  1. #1

    {includetext] help?

    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.

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hard to tell without knowing how your inserting it......not mindreaders ya know. Post your file.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    Perhaps it's the data that's the problem?

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •