Solved

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

Posted on 1998-08-08
2
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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