How to Call Word Macro in ASP.NET

B

Brian Kwan

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!
 
M

Mark Rae

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...
 
K

Kevin Spencer

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.
 
K

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.
 
J

Juan T. Llibre

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...
 
K

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.
 
B

Brian Kwan

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!
 
P

Paul Clement

¤ 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)
 
B

Brian Kwan

Paul Clement 寫é“:
¤ 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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top