Results 1 to 12 of 12
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Merging large chunks of text (WinNT/Word97)

    Can anyone tell me how to use Autotext (or something similar) when the document to use it is not a template?

    I have a mailmerge document using an XL datasource which is getting quite complicated, and about to get worse! One of the options I need to put in involves blocks of text, anything from 100 words or so in three paragraphs to a page and a half with a table included. A field in the datasource tells the merge document which version is required for the document, and I was going to put these in by saving them as autotext entries and using a code to enter them, such as:

    { AUTOTEXT { MERGEFIELD HOURS_OF_WORK1 } * MERGEFORMAT }

    Then I discovered that Word won't let you save autotext entries in the document, just in the template it's based on, normal.dot - mine is not the same normal.dot as the user who's getting this is using, and in any case our normal.dots are locked down and un-editable.

    It's quite important that the formatting is kept with the text (expecially with the table in one of them!) and I really don't think it's going to be practical to put the entire content in IF fields - it adds up to about 10 pages of text! - so I'm stumped!

    Can anyone suggest another way to do this?

    Pretty please!
    Beryl M


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Can't you create a dedicated template for this? Shove the autotext entries into the template, and base the merge document on the template. Save the template in a network folder, and have users use that folder as their Workgroup Templates folder. Or is this too naive?

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Hans, you're a wonder! Since I control the templates for the company (within set limits), yes, your solution is perfect!

    Many thanks
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Beryl M


  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Hmm - well, your suggestion works, as an answer to my question, but it looks like the Autotext route isn't going to work. It seems to work properly until I run the merge - then it just puts the same entry in every instance, whichever entry was last seen on the master!

    Unless there's some way to make it refresh the merge document prior to merging each record...?
    Beryl M


  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    I didn't test my previous reply before I posted it, but I see now that it doesn't work. I tried some variations and they don't work either. I don't know how to get around this, but our resident Word field gurus will probably come up with a brilliant solution.

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Thanks anyway, Hans - I guess I'll just have to keep my fingers crossed!

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Beryl M


  7. #7
    Star Lounger
    Join Date
    May 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Hi Beryl,

    Have you considered using IF fields to solve your problem? eg {If {MERGEFIELD HOURS_of_WORK1} > 30 "True text here" "False text here" }

    Multiple IFs could be combined if you require more than two choices. eg {If {MERGEFIELD HOURS_of_WORK1} > 30 "{If {MERGEFIELD HOURS_of_WORK1} > 40 "True text here" "False text here" }" "False text here" }

    If the text you wish to insert into the document is complicated, consider using the INCLUDETEXT field as this should make reading & editing the master document easier. eg {INCLUDETEXT "path & bookmark to document" }

    This could also be combined with an IF field.
    {If {MERGEFIELD HOURS_of_WORK1} > 30 "{INCLUDETEXT" "C:My DocumentsHours text.doc" }" "FalseText" }

    INCLUDETEXT fields do work with Excel files, but I think you would have less formatting & other problems if the text was in a Word doc.

    Regards,

    Matthew

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 18-Jun-03 14:38. to add formatting discussion)</P>Hi Beryl:
    Mathew's suggestion should work. You can use either AutoText entries or Includetext fields. You need a code in your datasource that selects the Includetext or or AutoText entry. So your fields will look like:

    {IF{MERGEFIELD Code}="1" "{AutoText "EntryName1"}"}
    {IF{MERGEFIELD Code}="2" "{AutoText "EntryName2"}"}
    {If{MERGEFIELD Code}="3" "{AutoText "EntryName3"}"}
    etc.

    -OR-

    {IF{MERGEFIELD Code}="1" "{IncludeText "C:My DocumentsBoilerplate1.doc"}"}
    {If{MERGEFIELD Code}="2" "{IncludeText "C:My DocumentsBoilerplate2.doc"}"}
    {IF{MERGEFIELD Code}="3" "{IncludeText "C:My DocumentsBoilerplate3.doc"}"}

    For more information on similar issues, see 183426, 211786, & 299837

    ADDED:
    Make sure that you format the fields in the main document. There is an alternative at Cindy Meister's website that I haven't tried (but will). <img src=/S/smile.gif border=0 alt=smile width=15 height=15> She says to display field codes & remove the word "mergefield" from the mergefields. Apparently, it still works & applies the formatting of the datasource.

    Cheers,

  9. #9
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Hi Phil/Matthew, thanks for your input. I did use IF fields, but they had to have the entire text in the field and since the project I was working on had to be in a day or two after I posted my initial request, I ended up going with that way - made it a bit bulky, but it worked, which was the important thing!

    I must admit I haven't used the INCLUDETEXT field before, though - I might have to have a look at that in more detail sometime soon! The AUTOTEXT worked but only for one document - to use it for the entire merge I would have to find some way of refreshing the result between each record, and I don't think that's possible!


    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Beryl M


  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Hi Beryl:
    The AutoText method should work for more than one document. As long as you have multiple AutoText entries & a code in the data source that tells Word which entry to use for each record.

  11. #11
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    Should is the word. It doesn't. I tried it!
    Beryl M


  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merging large chunks of text (WinNT/Word97)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 24-Jun-03 00:18. )</P>Hi Beryl:
    I tried it in Word 2000. I created 4 autotext entries called a1...a4. There is a bug somewhere. First, I got the behavior you described, only AutoText a1 worked. Then I got a2 to work. But I could not get a3 or a4 to work. See the attached template, datasource, & main document.

    Added: I did it again & this time all 4 work. For some reason, I had to put quotes around the condition...i.e.

    { If "{ MERGEFIELD AutoTextEntry } = A1" "{ autotext "a1" }" "{ If "{ MERGEFIELD AutoTextEntry }" = A2 "{ autotext "a2" }" }" "{ If "{ MERGEFIELD AutoTextEntry } = A3" "{ autotext "a3" }" { If { MERGEFIELD AutoTextEntry } = A3 "{ autotext "a3" }"} }" "{ If "{ MERGEFIELD AutoTextEntry }" = A4 "{ autotext "a4"}" }" "" }

    works. When I had {If { MERGEFIELD AutoTextEntry } = A1 "{ autotext "a1" }" etc.} (no quotes around the condition), it didn't work except for the first & later the second autotext entries. Have no idea why, though. I've actually had the opposite sometimes. When an IF field worked without quotes & didn't work if the condition was within a quote. Go figure!
    Attached Files Attached Files

Posting Permissions

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