473,513 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Call Word Macro in ASP.NET

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
10 2429
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
"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
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
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
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 Español : 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
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 Español : 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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1869
by: bekil | last post by:
Thanks for your suggestion Murray Jack. I also record macro while doing it manually in word then I edit the macro to see the required code. Firstly I am creating a blank page. Secondly I go to...
3
3835
by: Martin Austin | last post by:
Here's my problem. I'm launching an MS Word object on a Notes document Postopen event. The script kicks off a macro that saves the Word document to a temporary file every n minutes (backup of key...
5
5324
by: Mason | last post by:
I'm having some problems converting VBA for Word 2000 to code that VB.Net understands. I recorded a macro in Word to add numbering (a. b. c.) to my paragraphs. I managed to translate quite a bit...
0
889
by: Merdex | last post by:
Hi, I would like to print some data on template I created in word. How can I call an existing word macro and send some parameters to it from my VB 2005 application. Thanks in advance
1
4633
by: ParkMan | last post by:
Hello, I am trying to open a Word template, fill some fields, and mark some check boxes as checked. Here is the code I am using: ' Launch Word and load the report template Set objWord = New...
2
10874
by: steve | last post by:
Hi All What is the word mailmerge.opendatasource syntax when using sql server express as the data source Below is the code when using access.... odoc.MailMerge.OpenDataSource(Name:= _ ...
6
4608
by: Eric Layman | last post by:
Hi, I have fields from textareas. With a click of a button, php is able to grab these fields and by using header(), convert the output to Ms Word doc. But the outcome of the word doc...
0
1295
by: A1000ma | last post by:
I am trying to develop a C# program to fill in the blanks in a Word Form. Everything works beautifully while the program is running. I had to go in to fix some links on our Web Site a couple of...
1
1378
by: slickdock | last post by:
My vb code saves a record as a Word merge data file and merges it with a Word merge form file. Once the merge is complete, I would like the code to make this determination: There will always be...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.