Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Go Back  Xtreme Visual Basic Talk > > > Printing a Word Document from a VB.net application.


Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2005, 11:50 AM
mjs84 mjs84 is offline
Newcomer
 
Join Date: Nov 2003
Posts: 15
Default Printing a Word Document from a VB.net application.


I am looking for a way to print an exisiting Word or even Excel document from a VB.net application. I want to pass the sub a document name and it will send it to the printer while the application continues on it's way.

Is this possible? Does anyone have any ideas on how to do this?


Thanks in advance.

-mjs84
Reply With Quote
  #2  
Old 08-16-2005, 05:49 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

Do you know how to automate Excel or Word from .net already, if not check out THIS excellent tutorial to get started. As for the print part, check out the VBA help files for PrintOut method examples...
Reply With Quote
  #3  
Old 10-18-2011, 02:58 AM
hscoder hscoder is offline
Newcomer
 
Join Date: Oct 2011
Posts: 1
Default

with the help of this code snippet you can print the whole word document by passing only filepath

Private Sub PrintWordDocument(byval filepath as string)
Dim objWord As Word.Application
Dim objDoc As Word.Document
objWord = CreateObject("Word.Application")
objDoc = objWord.Documents.Open(filepath)
objDoc.PrintOut()
objDoc.Close()
objDoc = Nothing
objWord.Quit()
End Sub

for more information check this:
http://www.authorcode.com/print-word...ically-in-net/
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application. Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
 
Printing a Word Document from a VB.net application.
Printing a Word Document from a VB.net application.
 
-->