Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Printing the contents of an OLE Container (Word)

Posted on 2002-06-07
5
Medium Priority
?
170 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
[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
  • 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 53

Expert Comment

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

<listening..>
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

636 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