PC Review


Reply
Thread Tools Rate Thread

Automation of Word from .net 2

 
 
liya.tansky@gmail.com
Guest
Posts: n/a
 
      29th Jan 2007
Hello,
I'm developing an intranet (win XP, .NET 2, Visual Studio 2005,
Microsoft.Office.Interop.Word.dll in references) and needed to
implement find-replace in word doc before sending letter and it worked
fine on my station.
I've go it fine on my station, and it doesn't work at all on the web
server.
1. What should be the configuration of the server? There is .net SDK
2 and I've installed the oxppia.exe there. And changed the permissions
in DCOMCNFG for Word doc for ASP.NET user.
Should I also install there Offce XP?

2. Do I undestand correctly, that using Office 2003 will require
purchasing VSTO also?

PLEASE answer my questions, I'm completely lost and we planned on
starting to work with the site next week.

Thanks in advance

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      29th Jan 2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> I'm developing an intranet (win XP, .NET 2, Visual Studio 2005,
> Microsoft.Office.Interop.Word.dll in references)


Firstly, you really need to understand that server-side automation of Office
is not recommended at all to the extent that Microsoft won't actually
support any application which uses it:
http://support.microsoft.com/default...US;q257757#kb2

If you absolutely *have* to use Microsoft Word for what appears to be a
fairly simple mail function, then you need to consider a 3rd-party solution
like this:
http://www.aspose.com/Products/Aspos...s/Default.aspx

There are several other possible solutions:

1) Create the email as an HTML document. If you save it and give it a .doc
extension, Word will open it just like a native Word document

2) Use this:
http://www.microsoft.com/downloads/d...displaylang=en

3) If your email absolutely has to be in the form of an attachment, consider
using a PDF document instead of a Word document.


 
Reply With Quote
 
liya.tansky@gmail.com
Guest
Posts: n/a
 
      29th Jan 2007
Thank you for your quick answer.

My requirements are very strict.
The intranet will be used with existing docs, so PDF is not an option.
The client wants to send word only (not html) because his clients
requests word.
3-rd party is not also an option

So I need to use Word.

Do I need Office on the server for the automation? Will Office XP
answer my problems?

I'm asking also about Office 2003 and VSTo (if it is a must or not for
office 2003) , since the system administrator at my client's office
have installed Office 2003 on the web server and it surely didn't help
me, since I'm using xp redistributables. Tried ti switch to Office
2003, but couldn't find any article about web sites without mentioning
VSTO, so I'm just lost and very stressed on this.
Sorry for the simple questions.

On Jan 29, 2:33 am, "Mark Rae" <m...@markNOSPAMrae.com> wrote:
> <liya.tan...@gmail.com> wrote in messagenews:(E-Mail Removed)...
>
> > I'm developing an intranet (win XP, .NET 2, Visual Studio 2005,
> > Microsoft.Office.Interop.Word.dll in references)Firstly, you really need to understand that server-side automation of Office

> is not recommended at all to the extent that Microsoft won't actually
> support any application which uses it:http://support.microsoft.com/default...US;q257757#kb2
>
> If you absolutely *have* to use Microsoft Word for what appears to be a
> fairly simple mail function, then you need to consider a 3rd-party solution
> like this:http://www.aspose.com/Products/Aspos...s/Default.aspx
>
> There are several other possible solutions:
>
> 1) Create the email as an HTML document. If you save it and give it a .doc
> extension, Word will open it just like a native Word document
>
> 2) Use this:http://www.microsoft.com/downloads/d...d=fe118952-354...
>
> 3) If your email absolutely has to be in the form of an attachment, consider
> using a PDF document instead of a Word document.


 
Reply With Quote
 
Luke
Guest
Posts: n/a
 
      29th Jan 2007


On Jan 29, 12:57 am, liya.tan...@gmail.com wrote:
> Thank you for your quick answer.
>
> My requirements are very strict.
> The intranet will be used with existing docs, so PDF is not an option.
> The client wants to send word only (not html) because his clients
> requests word.
> 3-rd party is not also an option
>
> So I need to use Word.
>


You will need office on the server but as Mark pointed out you
shouldn't use Office automation on a webserver, I had the same issue
as you (tho I needed excel) from a server. After looking into and
having the problems which office automation has from aspnet it was
cheaper and easier to use the Aspose library. The cost, trouble and
lack of support of server side office automation means you should stay
clear of it (remebering you will require a license to install office
on the server). It is cheaper and far easier to go the 3rd party
route.

why is 3rd party not an option? If it's cost then IMO it would be
cheaper to purchase the aspose library and get something you know will
work and is supported.

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      29th Jan 2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> The client wants to send word only (not html) because his clients
> requests word.


You might find that they'd never know the difference! If they receive an
email with an attachment called e.g. Document.doc, what would they care if
it's actually an HTML document or a Word document...? When they click it, it
will display in Word just like a native Word document...

> So I need to use Word.


Best of luck, then...

> Do I need Office on the server for the automation?


Probably - how many licenses have you got...?

> Will Office XP answer my problems?


I have no idea...

> I'm asking also about Office 2003 and VSTo


Hasn't that already been discontinued...?
http://forums.microsoft.com/MSDN/Sho...06730&SiteID=1

> since the system administrator at my client's office have installed Office
> 2003
> on the web server


Wow!

> so I'm just lost and very stressed on this.


I appreciate that. However, you asked for advice and I gave it - I can't
help it if it's not what you wanted to hear...

You say you're stressed now - if you do go down this route, I can guarantee
you're going to get a lot more stressed as soon as your site goes live...

Office automation is not designed for this scenario. Please read the
Microsoft article again:
http://support.microsoft.com/default...US;q257757#kb2


 
Reply With Quote
 
liya.tansky@gmail.com
Guest
Posts: n/a
 
      29th Jan 2007
Thank you for your time.
Unfortunately, I have given documents that I need to send more then
once with different changes ( to different clients),
so I'll continue with the headache )

THank you again

On Jan 29, 3:32 am, "Mark Rae" <m...@markNOSPAMrae.com> wrote:
> <liya.tan...@gmail.com> wrote in messagenews:(E-Mail Removed)...
>
> > The client wants to send word only (not html) because his clients
> > requests word.You might find that they'd never know the difference! If they receive an

> email with an attachment called e.g. Document.doc, what would they care if
> it's actually an HTML document or a Word document...? When they click it, it
> will display in Word just like a native Word document...
>
> > So I need to use Word.Best of luck, then...

>
> > Do I need Office on the server for the automation?Probably - how many licenses have you got...?

>
> > Will Office XP answer my problems?I have no idea...

>
> > I'm asking also about Office 2003 and VSToHasn't that already been discontinued...?http://forums.microsoft.com/MSDN/Sho...06730&SiteID=1

>
> > since the system administrator at my client's office have installed Office
> > 2003
> > on the web serverWow!

>
> > so I'm just lost and very stressed on this.I appreciate that. However, you asked for advice and I gave it - I can't

> help it if it's not what you wanted to hear...
>
> You say you're stressed now - if you do go down this route, I can guarantee
> you're going to get a lot more stressed as soon as your site goes live...
>
> Office automation is not designed for this scenario. Please read the
> Microsoft article again:http://support.microsoft.com/default...US;q257757#kb2


 
Reply With Quote
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      29th Jan 2007
There are many ways to generate Word documents without using COM automation
on the server (which is not recommended.)
Here are more details on generated Word (and Excel) documents:
http://SteveOrr.net/articles/ExportPanel.aspx
http://SteveOrr.net/articles/ExportPanel.aspx

Here are some decent 3rd party options that can help with opening existing
Word docs and modifying the content before sending it out:
http://SteveOrr.net/reviews/AsposeWord.aspx
http://SteveOrr.net/reviews/OfficeWriter.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> I'm developing an intranet (win XP, .NET 2, Visual Studio 2005,
> Microsoft.Office.Interop.Word.dll in references) and needed to
> implement find-replace in word doc before sending letter and it worked
> fine on my station.
> I've go it fine on my station, and it doesn't work at all on the web
> server.
> 1. What should be the configuration of the server? There is .net SDK
> 2 and I've installed the oxppia.exe there. And changed the permissions
> in DCOMCNFG for Word doc for ASP.NET user.
> Should I also install there Offce XP?
>
> 2. Do I undestand correctly, that using Office 2003 will require
> purchasing VSTO also?
>
> PLEASE answer my questions, I'm completely lost and we planned on
> starting to work with the site next week.
>
> Thanks in advance
>


 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      29th Jan 2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> Unfortunately, I have given documents that I need to send more then
> once with different changes ( to different clients),


You really don't get it, do you...?

> so I'll continue with the headache )


It's going to get much, much worse once your site goes live - you do *know*
that, don't you...?

I wonder how your clients would feel about you if they knew that you are
continuing to pursue a development strategy which in all likelihood will not
work properly...?


 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      29th Jan 2007
"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <(E-Mail Removed)> wrote in
message news:B27E8081-C228-44F8-ABAC-(E-Mail Removed)...

> There are many ways to generate Word documents without using COM
> automation on the server (which is not recommended.)


The OP has already been given these recommendations but has chosen to ignore
them in favour of COM automation in the full knowledge that there is more
than a good chance that it will not work...


 
Reply With Quote
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      29th Jan 2007
Mark,

I agree with you that it's not a good idea.
But, it could work if his scalability requirements are VERY low and he has
excellent error recovery in place...

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"Mark Rae" <(E-Mail Removed)> wrote in message
news:OY8%23%(E-Mail Removed)...
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> Unfortunately, I have given documents that I need to send more then
>> once with different changes ( to different clients),

>
> You really don't get it, do you...?
>
>> so I'll continue with the headache )

>
> It's going to get much, much worse once your site goes live - you do
> *know* that, don't you...?
>
> I wonder how your clients would feel about you if they knew that you are
> continuing to pursue a development strategy which in all likelihood will
> not work properly...?
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft Dot NET 0 19th Jul 2007 10:15 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft C# .NET 0 19th Jul 2007 10:15 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft Word Document Management 0 19th Jul 2007 10:15 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft ASP .NET 0 19th Jul 2007 10:10 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Microsoft Excel Programming 0 19th Jul 2007 10:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 PM.