Solved

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

Posted on 1998-08-08
2
146 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month3 days, 23 hours left to enroll

630 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