Word Properties ( Accessing by VB6)

R

Roby E Martins

Hi,

I´m Roby E Martins, VB developer.
I´m trying to use word in a vb application, by
automation. It is working very well. But there are
something a want to do, but I don´t know how.

1) I need to block all kind of changes in the
Document , opening it only for viewing. User can´t change
anything until I set the property FALSE. Something like
Locked in textbox.
2) I need to know the real size (Width and Height) of
the document(with Tables, pictures and all).
3) Keypress, Mousepress event are available?
4) Can I remove the small buttons ( Horizontal Viewing
Type and Vertical Tracking the document ) near the
scrollbars without removing the scrollbars?

Thank you,
Roby E Martins
 
J

Jonathan West

Hi,

I´m Roby E Martins, VB developer.
I´m trying to use word in a vb application, by
automation. It is working very well. But there are
something a want to do, but I don´t know how.

1) I need to block all kind of changes in the
Document , opening it only for viewing. User can´t change
anything until I set the property FALSE. Something like
Locked in textbox.

Can't be done with Word documents. Word is inherently insecure. Anything
that can be viewed can be edited in some fashion.



2) I need to know the real size (Width and Height) of
the document(with Tables, pictures and all).

Well, a document spreads over a number of pages. I'm not sure exactly what
you are wanting to do. Are you wanting to find the width and height of the
page, the number of pages in the document, the position & size of elements
like tables of graphics?

3) Keypress, Mousepress event are available?

You mean reporting these events to your VB application? There are a range of
events generated by the Word application. In the Word VBA Help file, look up
the Application object, and then look at its Events. Keypress and Click
aren't available, but there are several other events which you can use. You
can connect them to your VB application by setting a reference to the Word
object model in your project and then declaring a variable of type
Word.Application using the WithEvents keyword.


4) Can I remove the small buttons ( Horizontal Viewing
Type and Vertical Tracking the document ) near the
scrollbars without removing the scrollbars?

Not as far as I know.
 

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

Similar Threads

msword8.h vs MSWORD.OLB 1
Word Undo 4
Word 2000 MDI 2
Word don´t display selection when lost focus 1
Losing Bookmarks 0
Word Fields 2
Word Document Numbering and Bullet 1
ListFormat in Word 1

Top