Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jan 2011
    Location
    Canberra
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a rather complex Word & Access system which takes a database of items and produces a catalog/directory using a mailmerge process. It was designed under Word 2007 and worked brilliantly. As part of the process at one point I remove all section breaks that have a sequence of characters before it (i.e. "Chars<section_break>"), but this does not seem to work in Word 2010. The final document has the Chars removed, but the section breaks remain.

    So I produce the document as it is and then try and manually tell it to replace all section breaks ^b with nothing using find and replace. Try it again this time replacing the section break ^b with $$%%. Either way Word simply refuses to delete/replace the section break. If I do a simple Find, then it will find each one in turn, but any attempt to replace them fails.

    Using Word 2007 and interrupting the VBA code, I can confirm that the same process works perfectly.

    So can anyone else confirm this "bug" and anyone got any ideas how to get around it?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    If I create a simple document in Word 2010, add a few section breaks and then use Find/Replace to replace ^b with nothing, it works fine - I end up with a 1-section document.

    So there must be something else going on with your document - does the problem occur only with your specialized document, or does it also occur if you test replacing section breaks in a new document created in 2010?
    What version of Word was the document created in? Is it a .doc or a .docx?

    Gary

  3. #3
    New Lounger
    Join Date
    Jan 2011
    Location
    Canberra
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Gary, I kinda thought that might be the case, and...

    The source document is a .docm created in Word 2007 originally, but since updated to a Word 2010 version. The .docm document is a mailmerge document that performs a merge function with data from an Access database to produce a new .docx merge document. The macros manipulate the output document to format it.

    One of these processes' is to locate the sequence "</ENDLIST>^b" (where ^b is the section break) and replace it with nothing. this combines the pages into one continuous document (not a page per merge record).

    As I look at the resultant .docx document everything has been done except that the section breaks remain. The sequence "</ENDLIST>" has been removed, but the section breaks remain. So as a test, I tried simply replacing all section breaks with nothing in the resultant merge document - a simple search and replace. It results in 0 replacements. So I try a simple find command searching for the ^b section break. It finds the first one and I can step on to each of the others. So it finds it OK, but only for a find not for a find and replace.

    So from your results, it seems that it is something to do with the merge document, but I cannot figure out what has changed. This process worked perfectly fine in Word 2007 but...

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Is it possible to post a stripped down version of the document - with mainly just the <ENDLIST> and section breaks left in - would be interesting to see if I get the same behavior in Word 2010 here.

    Gary

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Hopefully your macro manually determines whether it is a wildcard or regular search, since that might make a difference.

    Does it matter whether the document is in Print Layout or Draft view?

  6. #6
    New Lounger
    Join Date
    Jan 2011
    Location
    Canberra
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Gary, great offer. I can't do that just yet. Simple reason being that I'm still on Word 2007 and the people I wrote this for (who are now on 2010) will not be able to strip it down. If I got a copy, then it would be going through conversions which would not guarantee consistency. It will take about a week before I'm back out there, so when I am I'll generate a modified form that you can look at (just leave a couple of pages or so with data manually changed to protect the organisations). It would be interesting to see what you make of it.

    Jshere2000, I'm not sure what you mean about the macro determining wildcard versus regular search - basically I recorded a macro of the action and adapted that into the code. Regardless, once I have the document, I'm just using the basic commands ^h to setup a search and replace manually and that fails so... I did not check whether it was in print layout or Draft view - will do so when I'm out there again.

    Work around probably sorted. I've modified the way the document works so that I produce a catalog rather than a mailmerge document. This removes the section breaks altogether and the source document only needed the "</ENDLIST/>" bit removed to allow the document to produce the way it's meant to. This change worked fine in 2007 a little while ago, so I think it will work in 2010 when I try it there.

    Regardless, I'm still curious as to how this has changed in 2010 from 2007. It was weird having a document in which I could find section breaks with a search but could not perform a replace. Like word knows they are there, but does not know how to replace them. When is a section break not a section break!

    thanks for comments, I'll report back, but unfortunately will be about a week before I can check these bits out.

  7. #7
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    If you are tracking revisions then a search and replace of section breaks will fail - can you verify that the document is not being revision tracked?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  8. #8
    New Lounger
    Join Date
    Jan 2011
    Location
    Canberra
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A good question Andrew. I'm pretty sure it's not tracking changes as manual edits did not show any side bars, colours etc. But I'll double check when I can try it again.

Posting Permissions

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