Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1998-08-08
2
Medium Priority
?
147 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 160 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 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…
Suggested Courses

722 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