Results 1 to 4 of 4
  1. #1
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,176
    Thanks
    200
    Thanked 781 Times in 715 Posts
    Does anyone know of an event or method to check for the completion of pagination in a word document using VBA?
    I tried the object browser but it just comes up with the property to turn it on or off.

    Thanks,

    RG
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts
    RG,

    I think you're right that there's no direct way to do this via VBA.

    Just out of curiosity, what's the context for your needing to determine pagination status?

    Gary

  4. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,176
    Thanks
    200
    Thanked 781 Times in 715 Posts
    Quote Originally Posted by Gary Frieder View Post
    Just out of curiosity, what's the context for your needing to determine pagination status?
    Gary,

    Sorry for the lack of detail.

    I have a large Access database for our Homeowners' Association. I've built a Phonebook in Word that nicely folds in half down to 5 1/2 x 4 1/4". The Phone book has two listings Alpha & by Address. I'm copying the results of two Access queries into this template as follows:
    In Access Ctrl+A - Ctrl+C
    In Word I execute a different macro for each listing which locates the appropriate bookmark location then does the paste and some table size reformatting. However, I've noticed that if I try to copy the second listing in before the 1st is completed it doesn't format/repaginate correctly.

    I intend to eventually automate the entire process from the Access side but don't want to continue until I know if I can control this problem.

    RG
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  5. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts
    RG,

    First off, there are probably more efficient ways to get data from Access into Word, than copying and pasting the results of an Access query into a Word table. One way to do this is to have code in Word that uses ADO to run the query and dynamically build the table based on the data returned. Access doesn't even have to be running to do it this way. You could also do a merge from Word. I don't do much work with Access so can't help much with details - maybe someone else can advise on the most efficient method to use.

    In general though, Word tables once they get very large, become resource-intensive and can bog a document down. One thing people do in that situation is to keep the document in Normal view, to cut down on repagination demands. Within your macro, you could try turning off repagination and switch the document to Normal view if it isn't already, and then switch these settings back at the end of the macro - that might help some.

    Gary

Posting Permissions

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