Microsoft Word Development - Crisis

A

avarghese

Hi

I have an application that pulls data from the database and displays them in Word documents. How it works is

1) An client-server interface allows the user to choose whether to start a new document or open an existing one
2) The client server interface opens Microsoft Word and attaches a template to it. From here on Word takes over and the
client-server application is no more relevant. All user-interface capabilities are implemented in Word using VBA. The
version of Word we use is Word 2000
3) A VBA screen with a list of sections pops up and asks the user to select the record and the sections that need to be
displayed for that record. User selects and presses "Finish"
4) Word pulls data related to the selected record and relevent to the sections selected by the user and formats them into
paragraphs/tables and puts them in a word document. Word also paginates and indexes the document. Document size
could range from just 50 pages to 800 pages depending on user selection. Word pulls this data from a web-server by
invoking the url which returns an XML document along with data and some minimal formatting back to Word.
5) Once the document is displayed the user may re-paginate/re-index or refresh different sections or all sections of the
document
6) User may also archive a document and next year work with the same document to refresh what has changed in a
years time

However, I found that whenever the document is more than 500 pages in size, Word crashes if the user tries to paginate/re-index or if the user simply navigates down the pages in the document. I think this could be because of the size of the document. Looks like Word cannot handle exceptionally large documents. I'm not sure.

This is where I need some advice. I planned to try and split up this document based on user inputs. Along with selecting sections to put into the document, the user will also be asked to choose which sections should be within the document and which ones should be appendages. The the document generation utility should generate different documents with reference links to those appendages. However, when the user prints the main document, it should print the other documents seamlessly as if it is one document. That is one solution

Another solution is to move the forms (screens) out of the VBA template file (there are currently 11 screens for various requirements) onto my client-server application and leave only the document generation code within the template. It could be possible that Word cannot handle such a large template file as an attachment. The size of the template file is 685 KB.

I need some kind of advice or help. I need to know whether I am on the right track. Is it true that Word cannot handle large template files as attachments? Is it true that Word cannot handle documents that are bigger than 500 pages? If so, what is the best solution to this problem? The clients are not too happy with upgrading their machines to higher configurations. They currently have Pentium III with Windows 2000 installed, about 4GB HDD and 125MB-256MB RAM. So thats not really bad configs. So, whatever enhancements/improvements have to be handled within my application. I'd really appreciate any help

Thank you
Ale
 
J

Jezebel

There is a limit to the document size (2GB) but you usually run into other
problems long before then. Some issues that might be related to your
problem:

1) The Undo stack. Word is tracking all the changes you make to the
document. Try clearing the undo list periodically.

2) 'Formatting too complex' Word raises this rather cryptic error if you do
too much automatic work on a document. Try saving (and optionally close and
re-open) periodically.

3) Run your app with the Task Manager showing and watch what's going on with
your memory usage: is there a memory leak in your code?

4) The machines you describe have enough processing power and HD, but
128-256 MB is very low on RAM for this sort of application. Try your app on
a 512Mb machine and see what difference it makes. Likely to be much faster,
if nothing else.




avarghese said:
Hi,

I have an application that pulls data from the database and displays them
in Word documents. How it works is:
1) An client-server interface allows the user to choose whether to
start a new document or open an existing one.
2) The client server interface opens Microsoft Word and attaches a
template to it. From here on Word takes over and the
client-server application is no more relevant. All user-interface
capabilities are implemented in Word using VBA. The
version of Word we use is Word 2000.
3) A VBA screen with a list of sections pops up and asks the user to
select the record and the sections that need to be
displayed for that record. User selects and presses "Finish".
4) Word pulls data related to the selected record and relevent to the
sections selected by the user and formats them into
paragraphs/tables and puts them in a word document. Word also
paginates and indexes the document. Document size
could range from just 50 pages to 800 pages depending on user
selection. Word pulls this data from a web-server by
invoking the url which returns an XML document along with data and
some minimal formatting back to Word.
5) Once the document is displayed the user may re-paginate/re-index or
refresh different sections or all sections of the
document.
6) User may also archive a document and next year work with the same
document to refresh what has changed in a
years time.

However, I found that whenever the document is more than 500 pages in
size, Word crashes if the user tries to paginate/re-index or if the user
simply navigates down the pages in the document. I think this could be
because of the size of the document. Looks like Word cannot handle
exceptionally large documents. I'm not sure.
This is where I need some advice. I planned to try and split up this
document based on user inputs. Along with selecting sections to put into the
document, the user will also be asked to choose which sections should be
within the document and which ones should be appendages. The the document
generation utility should generate different documents with reference links
to those appendages. However, when the user prints the main document, it
should print the other documents seamlessly as if it is one document. That
is one solution.
Another solution is to move the forms (screens) out of the VBA template
file (there are currently 11 screens for various requirements) onto my
client-server application and leave only the document generation code within
the template. It could be possible that Word cannot handle such a large
template file as an attachment. The size of the template file is 685 KB.
I need some kind of advice or help. I need to know whether I am on the
right track. Is it true that Word cannot handle large template files as
attachments? Is it true that Word cannot handle documents that are bigger
than 500 pages? If so, what is the best solution to this problem? The
clients are not too happy with upgrading their machines to higher
configurations. They currently have Pentium III with Windows 2000 installed,
about 4GB HDD and 125MB-256MB RAM. So thats not really bad configs. So,
whatever enhancements/improvements have to be handled within my application.
I'd really appreciate any help.
 
C

Charles Kenyon

Any chance that you are trying to stretch a table over those 500 pages or a
significant part of it? I've had documents with 10000 full pages of text in
Word 97 (and later versions).

Apply formatting through styles rather than using direct formatting. Direct
formatting adds tremendously to the complexity of a document.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

avarghese said:
Hi,

I have an application that pulls data from the database and displays them
in Word documents. How it works is:
1) An client-server interface allows the user to choose whether to
start a new document or open an existing one.
2) The client server interface opens Microsoft Word and attaches a
template to it. From here on Word takes over and the
client-server application is no more relevant. All user-interface
capabilities are implemented in Word using VBA. The
version of Word we use is Word 2000.
3) A VBA screen with a list of sections pops up and asks the user to
select the record and the sections that need to be
displayed for that record. User selects and presses "Finish".
4) Word pulls data related to the selected record and relevent to the
sections selected by the user and formats them into
paragraphs/tables and puts them in a word document. Word also
paginates and indexes the document. Document size
could range from just 50 pages to 800 pages depending on user
selection. Word pulls this data from a web-server by
invoking the url which returns an XML document along with data and
some minimal formatting back to Word.
5) Once the document is displayed the user may re-paginate/re-index or
refresh different sections or all sections of the
document.
6) User may also archive a document and next year work with the same
document to refresh what has changed in a
years time.

However, I found that whenever the document is more than 500 pages in
size, Word crashes if the user tries to paginate/re-index or if the user
simply navigates down the pages in the document. I think this could be
because of the size of the document. Looks like Word cannot handle
exceptionally large documents. I'm not sure.
This is where I need some advice. I planned to try and split up this
document based on user inputs. Along with selecting sections to put into the
document, the user will also be asked to choose which sections should be
within the document and which ones should be appendages. The the document
generation utility should generate different documents with reference links
to those appendages. However, when the user prints the main document, it
should print the other documents seamlessly as if it is one document. That
is one solution.
Another solution is to move the forms (screens) out of the VBA template
file (there are currently 11 screens for various requirements) onto my
client-server application and leave only the document generation code within
the template. It could be possible that Word cannot handle such a large
template file as an attachment. The size of the template file is 685 KB.
I need some kind of advice or help. I need to know whether I am on the
right track. Is it true that Word cannot handle large template files as
attachments? Is it true that Word cannot handle documents that are bigger
than 500 pages? If so, what is the best solution to this problem? The
clients are not too happy with upgrading their machines to higher
configurations. They currently have Pentium III with Windows 2000 installed,
about 4GB HDD and 125MB-256MB RAM. So thats not really bad configs. So,
whatever enhancements/improvements have to be handled within my application.
I'd really appreciate any help.
 
G

Graham Mayor

You can't avoid using styles in Word, so you have been using them, you just
didn't realise it. The secret of styles is for every unique paragraph should
have its own paragraph style - that's unique in layout not content! By
creating your own styles, you can apply formatting across the document that
is easy to change.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
C

Charles Kenyon

I don't mean style sheets, I mean styles. They are incorporated in templates
and documents and contain either paragraph formatting or character (font)
formatting.

They are at the heart of how Word is set up. You need to learn about them to
use Word effectively and efficiently. A good starting place might be <URL:
http://word.mvps.org/FAQs/Customization/CreateATemplatePart2.htm>
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

avarghese said:
Thanks Charles and Jezebel!

You've certainly come up with some innovative ideas. I'll try them and see
whether I can improve my performace. One question tho':
You mentioned that I should use styles. I have never used styles in Word.
I assume you mean stylesheets. Can I attach a style sheet to a word
document? Could you please show me the commands to do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top