By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,586 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,586 IT Pros & Developers. It's quick & easy.

How to Call Word Macro in ASP.NET

P: n/a
Requirement: Call a Word Macro from ASP.NET with parameters

Do anyone have idea about this? Please notice the import statement and
sample code, as I am a beginner using ASP.NET, thanks for your kindly
reply!

Nov 19 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
KMA
I assume the Word macro resides in a doc file that is held server side?
"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Requirement: Call a Word Macro from ASP.NET with parameters

Do anyone have idea about this? Please notice the import statement and
sample code, as I am a beginner using ASP.NET, thanks for your kindly
reply!

Nov 19 '05 #2

P: n/a
"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Requirement: Call a Word Macro from ASP.NET with parameters

Do anyone have idea about this? Please notice the import statement and
sample code, as I am a beginner using ASP.NET, thanks for your kindly
reply!


Yes, but you would have to install Word on the webserver, then instantiate
it with COM InterOp.

This is a really bad idea...On your desktop machine, open up Task Manager
and select the Processes tab. Now launch Word and watch how much of your
machine's resources it uses up. Now multiply that by the number of
concurrent users you can reasonably expect to be connected to your
webserver...

Do yourself a MASSIVE favour and find a native .NET way of doing what your
Word macro is doing...
Nov 19 '05 #3

P: n/a
This is the sort of "requirment" that assumes a necessity for something like
a Word Macro to accomplish a task, which may be accomplished in some other
way that makes a lot more sense. What exactly is this Word Macro supposed to
do?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Requirement: Call a Word Macro from ASP.NET with parameters

Do anyone have idea about this? Please notice the import statement and
sample code, as I am a beginner using ASP.NET, thanks for your kindly
reply!

Nov 19 '05 #4

P: n/a
KMA
But where's the fun in that?

Picture the scene: your manager has just had a brainwave about how he can
use his Word Macro to spell check online order forms. After all, it works
great on the desktop for his expences forms. Isn't this what
Interoperability is all about?

If you nip it in the bud now, how will we ever get to "Using excel to store
my database records", "Using Paint to convert bmps to jpegs".

For heavens sake, have a heart.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uL**************@TK2MSFTNGP15.phx.gbl...
"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Requirement: Call a Word Macro from ASP.NET with parameters

Do anyone have idea about this? Please notice the import statement and
sample code, as I am a beginner using ASP.NET, thanks for your kindly
reply!


Yes, but you would have to install Word on the webserver, then instantiate
it with COM InterOp.

This is a really bad idea...On your desktop machine, open up Task Manager
and select the Processes tab. Now launch Word and watch how much of your
machine's resources it uses up. Now multiply that by the number of
concurrent users you can reasonably expect to be connected to your
webserver...

Do yourself a MASSIVE favour and find a native .NET way of doing what your
Word macro is doing...

Nov 19 '05 #5

P: n/a
re:
Picture the scene: your manager has just had a brainwave about how
he can use his Word Macro to spell check online order forms.
You misspelled "brainfart"... ;-)

KMA, if that is not just an example, and that *is* what your manager
wants you to do, there's quite a few good spell-checkers on the market.

SharpSpell : http://www.tachyon-labs.com/sharpspell/
RapidSpell : http://www.keyoti.com/products/rapidspell/dotNetWeb/
CuteEditor : http://cutesoft.net/example/integrate_withnetspell.aspx

and a host of others...

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"KMA" <km*@chum.com> wrote in message news:dj*********@atlas.ip-plus.net... But where's the fun in that?

Picture the scene: your manager has just had a brainwave about how he can
use his Word Macro to spell check online order forms. After all, it works
great on the desktop for his expences forms. Isn't this what
Interoperability is all about?

If you nip it in the bud now, how will we ever get to "Using excel to store
my database records", "Using Paint to convert bmps to jpegs".

For heavens sake, have a heart.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uL**************@TK2MSFTNGP15.phx.gbl...
"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
> Requirement: Call a Word Macro from ASP.NET with parameters
>
> Do anyone have idea about this? Please notice the import statement and
> sample code, as I am a beginner using ASP.NET, thanks for your kindly
> reply!


Yes, but you would have to install Word on the webserver, then instantiate
it with COM InterOp.

This is a really bad idea...On your desktop machine, open up Task Manager
and select the Processes tab. Now launch Word and watch how much of your
machine's resources it uses up. Now multiply that by the number of
concurrent users you can reasonably expect to be connected to your
webserver...

Do yourself a MASSIVE favour and find a native .NET way of doing what your
Word macro is doing...


Nov 19 '05 #6

P: n/a
KMA
fortunately, I'm out of that kind of situation now, but a previous manager
was very much like that. We had spreadsheets linked to access linked to a
mainframe and so on. Frightening really. Lucky we were only selling mail
order clothing. Eventually he got the sack. Apparently he now works in
cardiovascular monitoring, whatever that is.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:eA**************@TK2MSFTNGP12.phx.gbl...
re:
Picture the scene: your manager has just had a brainwave about how
he can use his Word Macro to spell check online order forms.


You misspelled "brainfart"... ;-)

KMA, if that is not just an example, and that *is* what your manager
wants you to do, there's quite a few good spell-checkers on the market.

SharpSpell : http://www.tachyon-labs.com/sharpspell/
RapidSpell : http://www.keyoti.com/products/rapidspell/dotNetWeb/
CuteEditor : http://cutesoft.net/example/integrate_withnetspell.aspx

and a host of others...

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"KMA" <km*@chum.com> wrote in message

news:dj*********@atlas.ip-plus.net...
But where's the fun in that?

Picture the scene: your manager has just had a brainwave about how he can use his Word Macro to spell check online order forms. After all, it works great on the desktop for his expences forms. Isn't this what
Interoperability is all about?

If you nip it in the bud now, how will we ever get to "Using excel to store my database records", "Using Paint to convert bmps to jpegs".

For heavens sake, have a heart.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uL**************@TK2MSFTNGP15.phx.gbl...
"Brian Kwan" <ho*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...

> Requirement: Call a Word Macro from ASP.NET with parameters
>
> Do anyone have idea about this? Please notice the import statement and > sample code, as I am a beginner using ASP.NET, thanks for your kindly
> reply!

Yes, but you would have to install Word on the webserver, then instantiate it with COM InterOp.

This is a really bad idea...On your desktop machine, open up Task Manager and select the Processes tab. Now launch Word and watch how much of your machine's resources it uses up. Now multiply that by the number of
concurrent users you can reasonably expect to be connected to your
webserver...

Do yourself a MASSIVE favour and find a native .NET way of doing what your Word macro is doing...



Nov 19 '05 #7

P: n/a
for my case, there is a report layout in MS-Word format, what I want to
do is setup a Macro to put the data which extracting from database
through ASP.NET. Maybe I am laggard, I don't want to program the report
layout in coding, it's really troublesome. I've tried to use HTML
instead of Word, but the effect is not ok. If you guys do not sugguest
to use Word, or can you give some other ideas? Thanks!

Nov 19 '05 #8

P: n/a
On 18 Oct 2005 07:25:29 -0700, "Brian Kwan" <ho*********@gmail.com> wrote:

for my case, there is a report layout in MS-Word format, what I want to
do is setup a Macro to put the data which extracting from database
through ASP.NET. Maybe I am laggard, I don't want to program the report
layout in coding, it's really troublesome. I've tried to use HTML
instead of Word, but the effect is not ok. If you guys do not sugguest
to use Word, or can you give some other ideas? Thanks!

Have you considered using Crystal Reports? Automation of the Office apps via unattended processes is
not supported or recommended by Microsoft.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #9

P: n/a
"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:ap********************************@4ax.com...
Automation of the Office apps via unattended processes is
not supported or recommended by Microsoft.


For obvious reasons...!
Nov 19 '05 #10

P: n/a
Paul Clement 寫道:
On 18 Oct 2005 07:25:29 -0700, "Brian Kwan" <ho*********@gmail.com> wrote:

¤ for my case, there is a report layout in MS-Word format, what I want to
¤ do is setup a Macro to put the data which extracting from database
¤ through ASP.NET. Maybe I am laggard, I don't want to program the report
¤ layout in coding, it's really troublesome. I've tried to use HTML
¤ instead of Word, but the effect is not ok. If you guys do not sugguest
¤ to use Word, or can you give some other ideas? Thanks!

Have you considered using Crystal Reports? Automation of the Office apps via unattended processes is
not supported or recommended by Microsoft.
Paul
~~~~
Microsoft MVP (Visual Basic)


I don't know much about Crystal Report, I just wonder if Crystal Report
can do the effect as same as MS-Word. You know Word good at handling
word processing while Crystal Report not? Thanks for your replies!

Nov 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.