Office Word Programming >> Word Slooowwww When Opening Document with Embedded VB Widgets

by Joseph Geretz » Tue, 26 Sep 2006 01:36:53 GMT

We have an application which displays Word documents. Since our application
is view only, we've been using the Word Viewer to display our documents.

Recently, we shifted over to use Word via Automation, for better
programmatic integration. Our application is working, but we've noticed that
some documents take much longer to open. We've traced this to documents
which contain VBA programming with embedded VB widgets (controls). In
comparison, these documents open in a flash with WordViewer, but take 4 - 5
seconds to open in Word itself.

The fact that WordViewer can open these documents quickly gives me hope that
perhaps there is a way to open these quickly within Word itself. Any ideas?

Thanks very much for your help!

- Joe Geretz -



Office Word Programming >> Word Slooowwww When Opening Document with Embedded VB Widgets

by Jezebel » Tue, 26 Sep 2006 05:13:48 GMT


If you're opening them in Word itself, Word has to resolve the code library
references for each widget (via the registry), then find, open, and
initialize the code libraries. It also has to initialize the VBA code in the
document itself and its related template, likewise dealing with any
referenced libraries.

The Viewer doesn't do any of that.

Office Word Programming >> Word Slooowwww When Opening Document with Embedded VB Widgets

by Joseph Geretz » Tue, 26 Sep 2006 08:10:04 GMT

Is there any way I can direct Word to behave like the Viewer? That is, just
open a read-only copy of the document?

You may wonder why not just use the Word Viewer in that case? The trouble
with the Word Viewer is that it doesn't provide any interface for acting as
the server to a client software, it's designed strictly for interactive
purposes. This being the case, it's awkward to programmatically control the
Word Viewer from aother application. For this reason, we've switched over to
use Word itself, but we're now seing this undesirable behavior.

So if we could somehow get Word to behave like Word Viewer, that would be
perfect for us.

Thanks for your help!

- Joe Geretz -

Office Word Programming >> Word Slooowwww When Opening Document with Embedded VB Widgets

by Jezebel » Tue, 26 Sep 2006 09:16:48 GMT


No.

Similar Threads

1. Embed Word document in vb application form - VB.Net

2. opening an embedded document

Anand,

Thank you very much for your help.

I did find the InlineShapes collection, eventually, but it is a bit 
restrictive, as according to the documentation
there is no Name property.

I think I'll let that problem go its own way for now.

Thank you very mych again for your help and persistance. Much appreciated.

Joseph
"Anand.V.V.N" < XXXX@XXXXX.COM > wrote in message 
news: XXXX@XXXXX.COM ...
> Hi Joseph,
>
> This propertiy gives you the number of inline shapes
> ActiveDocument.InlineShapes.Count, usign this you can create a loop, there 
> is
> also
> ActiveDocument.InlineShapes.Item(i).Type property that gives type of the
> inline shape,
>
> I don't know hoe helpful this was by the way
>
> You can loop through the pcitures using the
> ActiveDocument.InlineShapes.Count  and then use the
> ActiveDocument.InlineShapes.Item(i).Type property, you can create a 
> bookmark
> and a Hyperlink if the type of the shape in the image like tiff etc.
>
> I hope this was helpful.
>
> Anand
>
> -- 
> "Who will guard the guards?"