VBA: Opinions needed

  • Hello,


    I need your opinion. I need to write a program that will allow user decided formatting of large word documents. Is there a better option than doing it with a Macro.


    Explanation: Many of the calls would a find and then replace within tables that span many pages (makes it very slow). Another example is moving from cell to cell to modify the text as needed and so forthl. This becomes very slow because of the screen refreshing and because the document is so large.


    Can someone suggest something?


    Thanks in advance.

  • Is this an existing document / documents that you are trying to re-format ?


    What sort of formats are you changing ?


    Fonts, table layouts etc ?


    One way to stop an office application from continually "refreshing is to add the following


    Code
    Sub reformat()
    
    
    Application.ScreenUpdating = False
    'your code here
    Application.ScreenUpdating = True
    End Sub


    Can you give us some more detail of what you are tyring to do please...


    Hope this helps,


    Will

  • Yes this is existing documents that need to be formatted according to the shop's specifications. Unfortunately they don't want to go to XML. Nonethless, the formatting would involve


    1. moving from cell to cell, parsing English/French text
    2. Moving cell to cell to formatting tables that span sometimes more than 500 pages (it is done using a do while loop/move next. I'm not sure if you have seen this before, but word does not like tables larger than a couple of pages!)
    3. Find and replace (document is sometimes more than 1000 pages long)where the find and replace has to be done in a do while (not able to use the find replace all function).


    What I am looking for is to be able to format the document using a Word API with functions like Word's find replace all. But, I need to be able to modify the find replace all function. Any suggestions?


    Thanks in advance.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!