Solved

Opening a word document, in..?, and how..?

Posted on 1998-08-08
2
141 Views
Last Modified: 2010-04-30
I want following;

To open a word document, with included images, and formatting.


Am I to use a std. textbox or a richtextbox?
Can you please give me some code for opening a word doc, I am trying following, wich gives me a 'input past end of file' error, can you give me the right code please?

thank you.
0
Comment
Question by:CATT
2 Comments
 
LVL 9

Expert Comment

by:Dalin
ID: 1468307
CATT,
Do you want to use OLE automation/OLE Control? or wanted to put the doc in a text box?
0
 

Accepted Solution

by:
vinoopauls earned 80 total points
ID: 1468308


1. This is if you want to open Word itself. This guaratees the format and you can control
    Word from code.

        Include Word 8.0 Object Library in the References

        Dim wd As New Word.Application
        Dim doc As Word.Documents

        Private Sub Form_Load()
            Set doc = wd.Documents
            doc.Open ("C:\test.doc")
            wd.WindowState = wdWindowStateMaximize
        End Sub

2. Otherwise use the Rich text Box by setting the filename property
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question