Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Printing the contents of an OLE Container (Word)

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
dmoring
Asked:
dmoring
  • 3
1 Solution
 
Richie_SimonettiIT OperationsCommented:
Instead of Using that, why don't you use Automation with word itself?
If you need the code, just ask.
0
 
Ryan ChongCommented:
You may try the BitBlt API..

<listening..>
0
 
Richie_SimonettiIT OperationsCommented:
' 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
 
dmoringAuthor Commented:
Sorry for the delay...project got the back burner, but I think that should work
0
 
Richie_SimonettiIT OperationsCommented:
Thanks for "A" grade.
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.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now