Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-2008, 11:21 AM
V.Balaji
 
Posts: n/a
Printing


Hi Friends,

I am trying to print word document in the server using vb.net and we are using following code to do so.

Dim WordApp As New Word.Application
WordApp.Documents.Open(strFullPath, , , , , , , , , , , , , , )
WordApp.Documents(1).PrintOut(, , , , , , , bv_CopiesNum, , , False, , bv_PrinterName, False, False, False, False, False)
WordApp.Documents(1).Close()
WordApp.Application.Quit()

Here the problem is sometime when the system is restarted this donsen't work and we get exception from the word.exe as

"Word cannot print. There is no printer installed"

Any workaround or solution is highly appricated.

Thanks in advance.

Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.
Reply With Quote
  #2 (permalink)  
Old 07-08-2008, 12:24 PM
Patrice
 
Posts: n/a
Re: Printing

What kind of server application is this ? ASP.NET ? Does it happen when no session is opened server side ?

You could install a printer in the default profile (the problem being that there is no printer installed for the service account you are likely using, if I remember the profile is not even loaded for this account, it is created from the default user profile so adding a printer there could solve the problem). I don't find the KB article right now.

AFAIK this is really not recommended (for example if the doc is marked with read only suggested, it will raise a dialog that will block furhter operations). You may want to give the big picture for alternate sugestiosn (for example AFAIK you can expose printers using http so that a user could print from its pc over internet on your printer). If this is to convert to another format such as PDF one could sugegst an alternate soltuino etc...

--
Patrice

"V.Balaji" <vba@iinterchange.com> a écrit dans le message de groupe de discussion : eDpgKzO4IHA.4908@TK2MSFTNGP04.phx.gbl...

Hi Friends,

I am trying to print word document in the server using vb.net and we are using following code to do so.

Dim WordApp As New Word.Application
WordApp.Documents.Open(strFullPath, , , , , , , , , , , , , , )
WordApp.Documents(1).PrintOut(, , , , , , , bv_CopiesNum, , , False, , bv_PrinterName, False, False, False, False, False)
WordApp.Documents(1).Close()
WordApp.Application.Quit()

Here the problem is sometime when the system is restarted this donsen't work and we get exception from the word.exe as

"Word cannot print. There is no printer installed"

Any workaround or solution is highly appricated.

Thanks in advance.

Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.
Reply With Quote
  #3 (permalink)  
Old 07-08-2008, 12:52 PM
V.Balaji
 
Posts: n/a
Re: Printing

Hi Patrice,

Thanks for immediate reply, This is a service written in vb.net which takes the document from a folder in server and prints it. This is from an application when the users give print it takes the file and print from the server. Printers are installed in server.

Thanks and Regards,
Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.

"Patrice" <http://www.chez.com/scribe/> wrote in message news:5F26DDF8-AEFE-4E68-9421-32CD41B86428@microsoft.com...
What kind of server application is this ? ASP.NET ? Does it happen when no session is opened server side ?

You could install a printer in the default profile (the problem being that there is no printer installed for the service account you are likely using, if I remember the profile is not even loaded for this account, it is created from the default user profile so adding a printer there could solve the problem). I don't find the KB article right now.

AFAIK this is really not recommended (for example if the doc is marked with read only suggested, it will raise a dialog that will block furhter operations). You may want to give the big picture for alternate sugestiosn (for example AFAIK you can expose printers using http so that a user could print from its pc over internet on your printer). If this is to convert to another format such as PDF one could sugegst an alternate soltuino etc...

--
Patrice

"V.Balaji" <vba@iinterchange.com> a écrit dans le message de groupe de discussion : eDpgKzO4IHA.4908@TK2MSFTNGP04.phx.gbl...

Hi Friends,

I am trying to print word document in the server using vb.net and we are using following code to do so.

Dim WordApp As New Word.Application
WordApp.Documents.Open(strFullPath, , , , , , , , , , , , , , )
WordApp.Documents(1).PrintOut(, , , , , , , bv_CopiesNum, , , False, , bv_PrinterName, False, False, False, False, False)
WordApp.Documents(1).Close()
WordApp.Application.Quit()

Here the problem is sometime when the system is restarted this donsen't work and we get exception from the word.exe as

"Word cannot print. There is no printer installed"

Any workaround or solution is highly appricated.

Thanks in advance.

Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.
Reply With Quote
  #4 (permalink)  
Old 07-08-2008, 01:06 PM
Patrice
 
Posts: n/a
Re: Printing

So the user asks to print a document in an application which then copy the file to a folder where a service gets the file and prints it server side ?

Couldn't the application directy print the file on a network printer ? Is this a problem to expose those printers on your network ?

Else if you still follow the the KB article I was thinking about is :
http://support.microsoft.com/kb/184291/en-us (it shows add to add pritner tot the default account so that a service account have those printers)

--
Patrice

"V.Balaji" <vba@iinterchange.com> a écrit dans le message de groupe de discussion : uc2UAmP4IHA.4988@TK2MSFTNGP04.phx.gbl...
Hi Patrice,

Thanks for immediate reply, This is a service written in vb.net which takes the document from a folder in server and prints it. This is from an application when the users give print it takes the file and print from the server. Printers are installed in server.

Thanks and Regards,
Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.

"Patrice" <http://www.chez.com/scribe/> wrote in message news:5F26DDF8-AEFE-4E68-9421-32CD41B86428@microsoft.com...
What kind of server application is this ? ASP.NET ? Does it happen when no session is opened server side ?

You could install a printer in the default profile (the problem being that there is no printer installed for the service account you are likely using, if I remember the profile is not even loaded for this account, it is created from the default user profile so adding a printer there could solve the problem). I don't find the KB article right now.

AFAIK this is really not recommended (for example if the doc is marked with read only suggested, it will raise a dialog that will block furhter operations). You may want to give the big picture for alternate sugestiosn (for example AFAIK you can expose printers using http so that a user could print from its pc over internet on your printer). If this is to convert to another format such as PDF one could sugegst an alternate soltuino etc...

--
Patrice

"V.Balaji" <vba@iinterchange.com> a écrit dans le message de groupe de discussion : eDpgKzO4IHA.4908@TK2MSFTNGP04.phx.gbl...

Hi Friends,

I am trying to print word document in the server using vb.net and we are using following code to do so.

Dim WordApp As New Word.Application
WordApp.Documents.Open(strFullPath, , , , , , , , , , , , , , )
WordApp.Documents(1).PrintOut(, , , , , , , bv_CopiesNum, , , False, , bv_PrinterName, False, False, False, False, False)
WordApp.Documents(1).Close()
WordApp.Application.Quit()

Here the problem is sometime when the system is restarted this donsen't work and we get exception from the word.exe as

"Word cannot print. There is no printer installed"

Any workaround or solution is highly appricated.

Thanks in advance.

Regards,
V.Balaji
iInterchange Systems Pvt. Ltd.,
Chennai | Tamil Nadu | India.
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:55 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Ringtones | Loans | Mortgages | Credit Monitoring | Pirate Costume



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109