To open EXCEL or WORD doc read-onl 
Author Message
 To open EXCEL or WORD doc read-onl


Is there a way to open programatically a EXCEL or WORD document   read-only
from Visual Basic 4.0 ?

You could use OLE automation for doing this as shown below.

Dim x as Excel.Application
Set x = CreateObject("Excel.Application")
x.Workbooks.Open FileName:="C:\My Documents\Book1.xls", ReadOnly := TRUE

[Note : You can use Microsoft Excel recorder to record VBA code, then
you can copy the code from Microsoft Excel to Visual Basic, then
do the neccessary modification to the code to reflect the above shown code]

Hope this helps,

Have a nice time,
Bharathy Mohan M.
Aditi Corp.

 Aditi Corp was formerly known as NetQuest Inc.

P.S. : Worried about response times to your queries?
 Check out our FREE technical support service at http://www.*-*-*.com/
OR just click on the attached link

begin 600 link.url

Tue, 08 Jun 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. open doc/excel file in frame with Word/Excel menubar

2. Excel open .doc or word open .xls?

3. How to open and read a word doc in a vba loop

4. Open a word doc in read-only in browser

5. Open word 97 doc with doc name as variable

6. Printing multiple Word doc files without opening each in word

7. Auto close open doc when opening another doc

8. Outlook VBA - open Excel, read in two fields, send email with these, close excel

9. Reading Excel files without opening excel

10. Open Excel doc from VBA

11. Opening an Excel doc from an Outlook custom form

12. Inserting Excel Chart into Word Doc through code


Powered by phpBB® Forum Software