473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

how to print multiple word documents via vb.net

I'd like to be able to print multiple documents are once using vb.net.
What is the best way to do this with out having to print each document
one at a time via a loop [calling
Word.PrintOut(fileName:=(OutputFileLocation & fileName)].

Can't I send them all to a spool at once or something?

Ideally, I would like the code such that multiple users can print via
my application at the same time.

Any help would be appreciated. Thanks

8957078

PS

Someone suggested merging the docs into one programatically but i'm
not sure if that would solve the problem i'm having with the printing
getting locked up when users try to print at the same time.

If this is a good idea, does anyone have any examples?
Nov 20 '05 #1
3 1890
* sp***********@yahoo.com (SpamProof) scripsit:
I'd like to be able to print multiple documents are once using vb.net.
What is the best way to do this with out having to print each document
one at a time via a loop [calling
Word.PrintOut(fileName:=(OutputFileLocation & fileName)].

Can't I send them all to a spool at once or something?

Ideally, I would like the code such that multiple users can print via
my application at the same time.


I would ask this question in the Word group: microsoft.public.word.vba.general.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Hi 8957078,

Unusual handle you've got there! ;-)

I think <your program> is going to have to be that spooler.

What's the objection to looping through your Word.Prints? If it's because
your app can't do anything until all the printing is done, then I would
suggest learning just how easy** it can be to do it in a separate Thread.

When you say 'multiple users ... at the same time', what do you mean,
exactly?

Regards,
Fergus

** 'easy' - a relative term, but I would hope that you'd be nicely surprised.
:-)
Nov 20 '05 #3
Hi SpamProof,
I'm using InterOp. It seems to lock up and never print if two or more
users try to print the same documents.

The problem you're running into is inherent to Word: Word puts a file
lock on opened documents because it doesn't support any kind of file
sharing.

My suggestion would be to have your program create a COPY of the
document (at the file level), open that, print it. And when the print
process is finished, delete all the copies.

-- Cindy

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: SpamProof | last post by:
I'd like to be able to print multiple documents are once using vb.net. What is the best way to do this with out having to print each document one at a time via a loop . Can't I send them all to...
18
by: Phil Powell | last post by:
I am trying to print out an HTML document that has MARGINWIDTH set to 1, however, upon printing, HTML table cell contents are cut off, for exmample: <table border="0" width="780"> <tr>...
3
by: philipl | last post by:
hi, I have a program which waits for batches documents to be dropped into a folder, once this happens, a class which activates the word object is instaniated per batchg of docs & a number of...
1
by: achintya.jha | last post by:
Hi, I am currently working hard to print Word labels from ASP.NET I have multiple records which I need to print on to a word label print functionality. I know that Word Label printing prints...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
3
by: siddhi | last post by:
Hi, I am very very new to vb6. I am trying to browse and read multiple microsoft word files. i am able to do for one file as follow, but not multiple files. Please I need help ASAP. Thanks Private...
2
by: westmids | last post by:
I'm not sure that what I want to do is possible with Access 97, but I hope to be proved wrong: Within Access 97 I have a table with a hyperlink field enabling me to open MS Word 97 documents. At...
1
by: kirkus84 | last post by:
I am currently trying to do a multiple record mail merge through a query via a command button on a form. The query basically displays customers who have said yes to privacy. The user inputs a date...
0
Pittaman
by: Pittaman | last post by:
Hello, We're developing an application (.NET 2.0) that let's users drop documents in the application and allows users to show some document types "embedded". For example, a textfile would appear...
0
by: shivapadma | last post by:
i want to know how multiple tables are added to the MS word document using vb.net i wrote following code to insert one table in MS word document using vb.net 1.opened MS word document 2.inserted...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.