Scrolling embedded Word document in VB5 OLE control 
Author Message
 Scrolling embedded Word document in VB5 OLE control

I'm building up a Word document from a form which shows the document
embedded in an OLE control on the same form.

This all works fine except that I can't see more than the first page in the
OLE control. I've tried calling the PageScroll method like this

gfrmmain.OLE1.object.application.activedocument.activewindow.activepane.page
scroll down:=1

but I get an error which implies that the activepane is already scrolled to
the last page (if I call pagescroll up:=1 there is no error).

Any ideas from you experts/MVPs?

Hopefully,
Chris Jones



Sun, 19 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control


Fri, 19 Jun 1992 00:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control
Have you considered using a WebBrowser Control as the container for your
Word Document?

If you are unfamiliar with this control (which is actually the core of
Internet Explorer 4), please e-mail me direct and I would be happy to send
you a small example (Vb6 Pro SP1, IE 4.01 SP1, Word97 {8.0], Win95) which
manipulates a Word document in a WebBrowser Control. Even without Vb6,
perhaps you could get something out of it with a little of ye olde cut 'n'
paste. No Strings attached.

Barry Evans
Canberra, Australia
----------------------------

I'm building up a Word document from a form which shows the document
embedded in an OLE control on the same form.

This all works fine except that I can't see more than the first page in the
OLE control. I've tried calling the PageScroll method like this

gfrmmain.OLE1.object.application.activedocument.activewindow.activepane.page
scroll down:=1

but I get an error which implies that the activepane is already scrolled to
the last page (if I call pagescroll up:=1 there is no error).

Any ideas from you experts/MVPs?

Hopefully,
Chris Jones



Mon, 20 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control
I second Barry's comments...  I've been there to!!!

However, I've been there using VB5.

VB5 SP3, IE4.01 SP1, Word97 (with the SR2 patches) and Win 95 or 98.

There are many little issues though!

I've also got it to run with IE 3 but there are different versions of the
web control which you have to use.

Yell out if this is the way you want to go and need help

Cheers

DiG

Quote:

>Have you considered using a WebBrowser Control as the container for your
>Word Document?

>If you are unfamiliar with this control (which is actually the core of
>Internet Explorer 4), please e-mail me direct and I would be happy to send
>you a small example (Vb6 Pro SP1, IE 4.01 SP1, Word97 {8.0], Win95) which
>manipulates a Word document in a WebBrowser Control. Even without Vb6,
>perhaps you could get something out of it with a little of ye olde cut 'n'
>paste. No Strings attached.

>Barry Evans
>Canberra, Australia
>----------------------------


>I'm building up a Word document from a form which shows the document
>embedded in an OLE control on the same form.

>This all works fine except that I can't see more than the first page in the
>OLE control. I've tried calling the PageScroll method like this

>gfrmmain.OLE1.object.application.activedocument.activewindow.activepane.pag
e
>scroll down:=1

>but I get an error which implies that the activepane is already scrolled to
>the last page (if I call pagescroll up:=1 there is no error).

>Any ideas from you experts/MVPs?

>Hopefully,
>Chris Jones



Mon, 20 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control
Thanks Don and Barry

I think this must be the way to go.

I take it you have Word running as well and do all the document manipulation
by OLE automation, saving each change and refreshing the Browser at the same
time? Can you programmatically scroll the browser view of the document?

Thanks very much for the offers of help - after the frustration and
depression I got myself into yesterday trying to follow the MS KB advice on
scrolling Word docs in OLE controls this has made me feel my fresh and
optimistic self again.

Cheers guys
Chris

I second Barry's comments...  I've been there to!!!

However, I've been there using VB5.

VB5 SP3, IE4.01 SP1, Word97 (with the SR2 patches) and Win 95 or 98.

There are many little issues though!

I've also got it to run with IE 3 but there are different versions of the
web control which you have to use.

Yell out if this is the way you want to go and need help

Cheers

DiG

Quote:

>Have you considered using a WebBrowser Control as the container for your
>Word Document?

>If you are unfamiliar with this control (which is actually the core of
>Internet Explorer 4), please e-mail me direct and I would be happy to send
>you a small example (Vb6 Pro SP1, IE 4.01 SP1, Word97 {8.0], Win95) which
>manipulates a Word document in a WebBrowser Control. Even without Vb6,
>perhaps you could get something out of it with a little of ye olde cut 'n'
>paste. No Strings attached.

>Barry Evans
>Canberra, Australia
>----------------------------


>I'm building up a Word document from a form which shows the document
>embedded in an OLE control on the same form.

>This all works fine except that I can't see more than the first page in the
>OLE control. I've tried calling the PageScroll method like this

>gfrmmain.OLE1.object.application.activedocument.activewindow.activepane.pag
e
>scroll down:=1

>but I get an error which implies that the activepane is already scrolled to
>the last page (if I call pagescroll up:=1 there is no error).

>Any ideas from you experts/MVPs?

>Hopefully,
>Chris Jones



Mon, 20 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control


Fri, 19 Jun 1992 00:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control

Despite the suggested solution for my Word doc display problems I still need
to display an Excel workbook in the OLE container control so that the user
can select stuff off it for pasting into the doc. I'm using the SizeMode =
AutoSize setting.

When the workbook is activated in place the OLE container control height and
width values include the interior of the document (the cells, chart etc) but
not the scrollbars and sheet selector tab that Excel very kindly adds to the
control. So the OLE container control as it appears on the form is larger
than it says it is. Anyone know how I can get the actual size of the
container? Maybe there's an API call I could use to retrieve the size of the
outer "frame".

TIA
Chris



Mon, 20 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control


Fri, 19 Jun 1992 00:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control
At the risk of overkill, have you considered the WebBrowser Control as an
OLE container for your Excel workbook as well???

Barry Evans
Canberra, Australia
-----------------------------

Despite the suggested solution for my Word doc display problems I still need
to display an Excel workbook in the OLE container control so that the user
can select stuff off it for pasting into the doc. I'm using the SizeMode =
AutoSize setting.

When the workbook is activated in place the OLE container control height and
width values include the interior of the document (the cells, chart etc) but
not the scrollbars and sheet selector tab that Excel very kindly adds to the
control. So the OLE container control as it appears on the form is larger
than it says it is. Anyone know how I can get the actual size of the
container? Maybe there's an API call I could use to retrieve the size of the
outer "frame".

TIA
Chris



Mon, 20 Aug 2001 03:00:00 GMT  
 Scrolling embedded Word document in VB5 OLE control
I had considered it but I need the user to be able to select some cells or a
chart and then for my application to copy the selected range or object to
the clipboard. If Excel is running inside the WebBrowser control is it
possible for me to manipulate it and to call properties like .Selection and
methods like .Copy and .CopyPicture?

Chris


At the risk of overkill, have you considered the WebBrowser Control as an
OLE container for your Excel workbook as well???

Barry Evans
Canberra, Australia
-----------------------------

Despite the suggested solution for my Word doc display problems I still need
to display an Excel workbook in the OLE container control so that the user
can select stuff off it for pasting into the doc. I'm using the SizeMode =
AutoSize setting.

When the workbook is activated in place the OLE container control height and
width values include the interior of the document (the cells, chart etc) but
not the scrollbars and sheet selector tab that Excel very kindly adds to the
control. So the OLE container control as it appears on the form is larger
than it says it is. Anyone know how I can get the actual size of the
container? Maybe there's an API call I could use to retrieve the size of the
outer "frame".

TIA
Chris



Mon, 20 Aug 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Creating Word documents from an Embedded OLE Word Template

2. Q: Scrolling embedded Word OLE

3. Trap keys pressed to ole container with word document embedded in it on win 95/98

4. (OLE)Embedding a word document in BV5.0

5. OLE and scrolling Word documents

6. Scroll bar with OLE (MS Word Document)

7. Loading Word document from Access OLE field into OLE container control in VB

8. Loading Word document from Access OLE field into OLE container control in VB

9. Loading Word document from Access OLE field into OLE container control in VB

10. How to use Ole Control to embed a word doc in VB.Net

11. How do you control the location of a Word Document inside an Ole Container control

12. Help Request: System Error when trying to save a word document with embedded ActiveX controls

 

 
Powered by phpBB® Forum Software