Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

running word on server for basic task

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  windows authentication  
Author Message
smb20002ns

External


Since: Jul 26, 2004
Posts: 18



(Msg. 1) Posted: Mon Jul 26, 2004 8:46 pm
Post subject: running word on server for basic task
Archived from groups: microsoft>public>inetserver>iis (more info?)

Having found no alternative software that will do this, I'm trying to get
word 2k, on NT4 to open/print/close a document, via an ASP page, using the
word.application object.

I can see the object start - winword appears in the taskman, but I can't
1) get the document to print
2) get the object to quit/close
this is my code :

set wordapp = createobject("word.application")
Response.Write "<!-- output copy to ps -->"
set worddoc = wordapp.documents.Open (filepath&strfilenamenew)
wordapp.documents(strfilenamenew).activate
For Each aDoc In Documents
  If InStr(1, aDoc.Name, "doc", 1) Then
   aDoc.Activate
   Response.Write "<script type='text/javascript'><!-- alert
('document open = ['"&aDoc.Name&"']!'); //--></script>"
  Else
   Response.Write "<script type='text/javascript'><!-- alert ('no
document open!'); //--></script>"
  End If
Next 'aDoc
intcharacters = worddoc.Characters.Count
Response.Write "<!-- document opened - characters["&intcharacters&"] -->"
wordapp.ActivePrinter = "Apple LaserWriter II NT v47.0"
worddoc.PrintOut Copies=1,PrintToFile=True, OutputFileName="e:\ia_docs
\convert\"&strfilenameprint
worddoc.close
wordapp.quit
set wordapp = nothing
set worddoc = nothing<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: running word on server for basic task 
Back to top
Login to vote
user641

External


Since: Aug 22, 2003
Posts: 1637



(Msg. 2) Posted: Tue Jul 27, 2004 11:48 am
Post subject: Re: running word on server for basic task [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"s_m_b" <smb20002ns.DeleteThis@hotmail.com> wrote in message
news:Xns953311C6E71F6smb2000nshotrmailcom@207.46.248.16...
 > Having found no alternative software that will do this, I'm trying to get
 > word 2k, on NT4 to open/print/close a document, via an ASP page, using the
 > word.application object.
 >
 > I can see the object start - winword appears in the taskman, but I can't
 > 1) get the document to print
 > 2) get the object to quit/close

probably because of this:
<a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=184291" target="_blank">http://support.microsoft.com/?kbid=184291</a>

also be aware of:
<a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=257757" target="_blank">http://support.microsoft.com/?kbid=257757</a>

--
Tom Kaminski IIS MVP
<a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</a>
<a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/" target="_blank">http://mvp.support.microsoft.com/</a>
<a style='text-decoration: underline;' href="http://www.iisfaq.com/" target="_blank">http://www.iisfaq.com/</a>
<a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running IIS
<a style='text-decoration: underline;' href="http://www.tryiis.com" target="_blank">http://www.tryiis.com</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: running word on server for basic task 
Back to top
Login to vote
smb20002ns

External


Since: Jul 26, 2004
Posts: 18



(Msg. 3) Posted: Tue Jul 27, 2004 11:48 am
Post subject: Re: running word on server for basic task [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in
news:ce5i8o$i8u2@kcweb01.netnews.att.com:

I was aware of the printers issue, and have tackled that.
I suspect the user profile issue may be the factor in this, though as
I've already got a functional page that opens a template, creates a
document, flows a form into it and saves it, I'm not entirely sure.

What I'd really appreciate is some advice on the config of a user profile
for the office stuff - my users authenticate to the web via NTLM.




 > "s_m_b" <smb20002ns.RemoveThis@hotmail.com> wrote in message
 > news:Xns953311C6E71F6smb2000nshotrmailcom@207.46.248.16...
  >> Having found no alternative software that will do this, I'm trying to
  >> get word 2k, on NT4 to open/print/close a document, via an ASP page,
  >> using the word.application object.
  >>
  >> I can see the object start - winword appears in the taskman, but I
  >> can't 1) get the document to print
  >> 2) get the object to quit/close
 >
 > probably because of this:
<font color=purple> > <a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=184291</font" target="_blank">http://support.microsoft.com/?kbid=184291</font</a>>
 >
 > also be aware of:
<font color=purple> > <a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=257757</font" target="_blank">http://support.microsoft.com/?kbid=257757</font</a>>
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: running word on server for basic task 
Back to top
Login to vote
smb20002ns

External


Since: Jul 26, 2004
Posts: 18



(Msg. 4) Posted: Wed Jul 28, 2004 10:41 am
Post subject: Re: running word on server for basic task [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"s_m_b" <smb20002ns.RemoveThis@hotmail.com> wrote in
news:Xns9533A8B81F34Csmb2000nshotrmailcom@207.46.248.16:

update - I moved the code to a separate file and most of it works now.
the one bit that still refuses is the print part - send it to lpt1 and
its happy, send it to file and it hangs. Nothing turns up in the printer
monitor, so it mus have a problem initialising it, but even with
application.visible set to true no error screens appear.

Any thoughts?


 > "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in
 > news:ce5i8o$i8u2@kcweb01.netnews.att.com:
 >
 > I was aware of the printers issue, and have tackled that.
 > I suspect the user profile issue may be the factor in this, though as
 > I've already got a functional page that opens a template, creates a
 > document, flows a form into it and saves it, I'm not entirely sure.
 >
 > What I'd really appreciate is some advice on the config of a user
 > profile for the office stuff - my users authenticate to the web via
 > NTLM.
 >
 >
 >
 >
  >> "s_m_b" <smb20002ns.RemoveThis@hotmail.com> wrote in message
  >> news:Xns953311C6E71F6smb2000nshotrmailcom@207.46.248.16...
   >>> Having found no alternative software that will do this, I'm trying
   >>> to get word 2k, on NT4 to open/print/close a document, via an ASP
   >>> page, using the word.application object.
   >>>
   >>> I can see the object start - winword appears in the taskman, but I
   >>> can't 1) get the document to print
   >>> 2) get the object to quit/close
  >>
  >> probably because of this:
<font color=green>  >> <a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=184291</font" target="_blank">http://support.microsoft.com/?kbid=184291</font</a>>
  >>
  >> also be aware of:
<font color=green>  >> <a style='text-decoration: underline;' href="http://support.microsoft.com/?kbid=257757</font" target="_blank">http://support.microsoft.com/?kbid=257757</font</a>>
  >>
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: running word on server for basic task 
Back to top
Login to vote
user641

External


Since: Aug 22, 2003
Posts: 1637



(Msg. 5) Posted: Wed Jul 28, 2004 2:16 pm
Post subject: Re: running word on server for basic task [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"s_m_b" <smb20002ns.RemoveThis@hotmail.com> wrote in message
news:Xns95349F47DD3BAsmb2000nshotrmailcom@207.46.248.16...
 > "s_m_b" <smb20002ns.RemoveThis@hotmail.com> wrote in
 > news:Xns9533A8B81F34Csmb2000nshotrmailcom@207.46.248.16:
 >
 > update - I moved the code to a separate file and most of it works now.
 > the one bit that still refuses is the print part - send it to lpt1 and
 > its happy, send it to file and it hangs. Nothing turns up in the printer
 > monitor, so it mus have a problem initialising it, but even with
 > application.visible set to true no error screens appear.
 >
 > Any thoughts?

profiles again ...

--
Tom Kaminski IIS MVP
<a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</a>
<a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/" target="_blank">http://mvp.support.microsoft.com/</a>
<a style='text-decoration: underline;' href="http://www.iisfaq.com/" target="_blank">http://www.iisfaq.com/</a>
<a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running IIS
<a style='text-decoration: underline;' href="http://www.tryiis.com" target="_blank">http://www.tryiis.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: running word on server for basic task 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]