Solved

Printing the contents of an OLE Container (Word)

Posted on 2002-06-07
5
164 Views
Last Modified: 2010-05-02
I need to print the contents of an OLE Container using word as the Embedded Object.  How do I do so from within VB?
0
Comment
Question by:dmoring
  • 3
5 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7063855
Instead of Using that, why don't you use Automation with word itself?
If you need the code, just ask.
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 7064995
You may try the BitBlt API..

<listening..>
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 100 total points
ID: 7065025
' Add a reference to microsoft word object library to your project

Option Explicit
Dim WordApp As Word.Application
Dim WordDoc As Word.Document

Private Sub Form_Load()
Set WordApp = New Word.Application
Set WordDoc = WordApp.Documents.Open("c:\mytest.doc")
With WordDoc
    .PrintOut
    .Saved = True
    .Close
End With
Set WordDoc = Nothing
WordApp.Quit
Set WordApp = Nothing

End Sub
0
 

Author Comment

by:dmoring
ID: 7117937
Sorry for the delay...project got the back burner, but I think that should work
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7118909
Thanks for "A" grade.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
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 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…

839 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