Solved

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

Posted on 1998-08-08
2
138 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
Comment Utility
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
Comment Utility


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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now