Programmatically make 100s of forms with a single word doc

  • Thread starter remig via AccessMonster.com
  • Start date
R

remig via AccessMonster.com

I'm building a labeling software for a shop. Basically they have 500 word
documents tied to all their different labels depending of what warnings and
instructions they need to print for each products.

I have 7 main reports which can cover all their products on which I'll have
to show between 5 and 10 of these documents (which need to keep their
formatting hence word format... unless you know a way around that). If I use
a oleunbound object and load the docs at runtime for each print, it takes
between 30 and 45 seconds to load the report which is unacceptable.

I want to make a single subreport for each possible document an bind the word
doc in that report so that the document does not need to be read and loaded
from disk (those documents are never updated once approved... only new ones
created).

Now since we're talking about 500+ documents, I don't want to do it by hand.

What I've done so far is make a empty report with the oleunbound object on it.
Then with VBA, I make a copy of that report and open it using openargs to
supply parameters which are then used to load the documents from within the
form itself (can't do it from outside because the report does not exists as I
write the code and I don't know any way around that). However once the
document is loaded and the report SAVED. The document is gone the next time
I reload.

I need that word doc to stay saved so that it doesn't reload (unless you know
a way to make it reload in sub seconds).
 

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