merging .pdf files using

Is there a way to merge multiple documents to print to 'Microsoft XPS Document Writer' or 'CutePDF Writer' using VB.NET?

I would like to try this method because even if I use a wait for process to complete, with the code attached, another print job could easily slip in-between.  The two printer methods listed above are currently on all the computers that will run this program.

I am trying to print a list of files including .docx and .pdf...  

the problem that I having is that when I go to print to the printer the order is not as expected.  I want the order to print in the order of the enclosure list, which when I debug, the order is correct. Just not going to the print que correctly.  I do not want to install a 3rd party .dll

Please help!!!!

enclosureList = [1]"C:\..\..\wordfile.docx"
For x As Integer = 0 To enclosureList.Count - 1
                Dim psInfo As New ProcessStartInfo

                With psInfo
                    .UseShellExecute = True
                    .Verb = "print"
                    .FileName = enclosureList(x)
                    .WindowStyle = ProcessWindowStyle.Hidden
                End With

Open in new window

Natavia FinnieSenior Analyst Technical Focus ApplicationsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael FowlerSolutions ConsultantCommented:
I know you do not want a third party dll but the best answer will probably be iTextSharp

Create the PDF's into a temp folder and then merge them.

If the issue with third party dll's is distribution use ilmerge to fold the dll into your exe

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.