473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

REPOST-MSOffice manipulation w/ WebPage or SmartClient?

Hi, no one answered so I thought reposting would get this some attention...

What is the best way to manipulate MSOffice programs? I understand that
regular web pages do not have certain permissions (because of safety
measures) to do things like open up MS word/excel programs, for example, from
a web site. Usually an activex control must be installed first I think?

What I need is a strategy for the best way to open up word/excel
applications and manipulate them by adding/removing text, formatting, and
doing mail merge types of transactions. Would ActiveX be the best strategy
to accomplish this from a web page?

I am NOT trying to make a desktop application to manipulate MSOffice only
because people want to be able to use this program from remote locations. I
have also taken a look at smart clients but I am not sure how difficult it is
to code them or if it is even a good idea?

Any thoughts or comments are welcome. Thanks in advance.
Jul 21 '05 #1
5 1618
You can programmatically manipulate Office documents on a web server,
but you will need to configure the code, web application, or the COM
object to run as a specific user that has the necessary permissions to
work with the documents.

If you want to manipulate Office documents on a server for a client,
then the best way is to use the Office Primary Interop Assemblies
(PIA), which can be downloaded from Microsoft. The PIA allows you to
interface with the Office COM objects, exposing the objects, methods,
and properties that will allow you to do just about anything to the
documents. Though, the PIA only exists for Office XP and 2003.
However, a cautious warning: Office was not intended to be automated
without an acutal user. Therefore, potential problems could occur
doing automation that will cause the process to hang. For instance, if
you are automating an Excel spreadsheet that generates some type of
prompting error during your manipulation, then the process will hang
because it is waiting for a user response that can never be given.

Jul 21 '05 #2
Thanks for replying.

The word/excel document templates will be loaded from the server on the
network and manipulated on the client machine. Any client machine on the
network should/will have permissions to access these documents. Howeve, I
thought that ASP.NET for example, was not allowed to load up Word/Excel using
the 'Set appWord = CreateObject("Word.Application")' command because of
security reasons. Guess I was wrong and it can in fact be done? I will take
a deeper look into this...

Any knowledge of Smart Client? I guess a Smart Client ISN'T the way to go
after all...I'm still a little unclear as to if using them would be a good
idea? It's just that my company currently uses a desktop interface on the
network and I thought that coding a Smart Client would give them the
familiarity of a desktop interface witih the ability to talk over the
internet/network w/ web services whenever needed. Then again, it may just be
a whole lot more work of code (creating XML web services and logic handlers
for Smart Clients) that do not need to be done. Do you have any knowledge of
Smart Client? If not, it's ok I will continue to look into your response.
Thanks again.

"Boyd Ferris" wrote:
You can programmatically manipulate Office documents on a web server,
but you will need to configure the code, web application, or the COM
object to run as a specific user that has the necessary permissions to
work with the documents.

If you want to manipulate Office documents on a server for a client,
then the best way is to use the Office Primary Interop Assemblies
(PIA), which can be downloaded from Microsoft. The PIA allows you to
interface with the Office COM objects, exposing the objects, methods,
and properties that will allow you to do just about anything to the
documents. Though, the PIA only exists for Office XP and 2003.
However, a cautious warning: Office was not intended to be automated
without an acutal user. Therefore, potential problems could occur
doing automation that will cause the process to hang. For instance, if
you are automating an Excel spreadsheet that generates some type of
prompting error during your manipulation, then the process will hang
because it is waiting for a user response that can never be given.

Jul 21 '05 #3
Here are a few comments that may help you with your design or point you
in a better direction:

In a closed environment where everyone is using Windows and has the
..NET Framework, then a smart client is almost always a better solution
than a web page. Web pages are only good for two things: displaying
read-only information or providing an interface that can be usable
across multiple operating systems. If you have a Microsoft
environment, then use a smart client using no-touch deployment (NTD).
NDT may be called by other names, but searching for "no touch
deployment" or "NTD" will give you information about this type of
deployment. NTD will allow you to distribute a Windows Forms
application like a web page; someone would simply type the URL or click
on a web page link to access the application. (You may need to adjust
the client's .Net Security settings to allow the application to
execute.)

If you are going to manipulate the Office document on the client and
want to use web pages, then you could perform this task on the client
using JavaScript. The security policy on the client would need to
allow the creation of ActiveX controls via JavaScript, using the
ActiveXObject. For the Office document's location, you would use the
web path, such as http://MyWebServer/MyDocument.doc. Here is a link
for the description on the JScript object:

http://msdn.microsoft.com/library/de...iveXObject.asp

I do not know the type of application you are building, so a web
application may be the best solution. However, you may want to
consider Windows Forms instead of web pages: create a windows
application, deploying it via the web using NDT. However, the client
machines will need to have the Office PIA installed and may need their
security settings adjusted. Though, if you still want to use web
forms, then you could use a .NET assembly embedded on the web page
using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,

Boyd

Jul 21 '05 #4
Here are a few comments that may help you with your design or point you
in a better direction:

In a closed environment where everyone is using Windows and has the
..NET Framework, then a smart client is almost always a better solution
than a web page. Web pages are only good for two things: displaying
read-only information or providing an interface that can be usable
across multiple operating systems. If you have a Microsoft
environment, then use a smart client using no-touch deployment (NTD).
NDT may be called by other names, but searching for "no touch
deployment" or "NTD" will give you information about this type of
deployment. NTD will allow you to distribute a Windows Forms
application like a web page; someone would simply type the URL or click
on a web page link to access the application. (You may need to adjust
the client's .Net Security settings to allow the application to
execute.)

If you are going to manipulate the Office document on the client and
want to use web pages, then you could perform this task on the client
using JavaScript. The security policy on the client would need to
allow the creation of ActiveX controls via JavaScript, using the
ActiveXObject. For the Office document's location, you would use the
web path, such as http://MyWebServer/MyDocument.doc. Here is a link
for the description on the JScript object:

http://msdn.microsoft.com/library/de...iveXObject.asp

I do not know the type of application you are building, so a web
application may be the best solution. However, you may want to
consider Windows Forms instead of web pages: create a windows
application, deploying it via the web using NDT. However, the client
machines will need to have the Office PIA installed and may need their
security settings adjusted. Though, if you still want to use web
forms, then you could use a .NET assembly embedded on the web page
using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,

Boyd

Jul 21 '05 #5
Thank you very much!

"Boyd Ferris" wrote:
Here are a few comments that may help you with your design or point you
in a better direction:

In a closed environment where everyone is using Windows and has the
..NET Framework, then a smart client is almost always a better solution
than a web page. Web pages are only good for two things: displaying
read-only information or providing an interface that can be usable
across multiple operating systems. If you have a Microsoft
environment, then use a smart client using no-touch deployment (NTD).
NDT may be called by other names, but searching for "no touch
deployment" or "NTD" will give you information about this type of
deployment. NTD will allow you to distribute a Windows Forms
application like a web page; someone would simply type the URL or click
on a web page link to access the application. (You may need to adjust
the client's .Net Security settings to allow the application to
execute.)

If you are going to manipulate the Office document on the client and
want to use web pages, then you could perform this task on the client
using JavaScript. The security policy on the client would need to
allow the creation of ActiveX controls via JavaScript, using the
ActiveXObject. For the Office document's location, you would use the
web path, such as http://MyWebServer/MyDocument.doc. Here is a link
for the description on the JScript object:

http://msdn.microsoft.com/library/de...iveXObject.asp

I do not know the type of application you are building, so a web
application may be the best solution. However, you may want to
consider Windows Forms instead of web pages: create a windows
application, deploying it via the web using NDT. However, the client
machines will need to have the Office PIA installed and may need their
security settings adjusted. Though, if you still want to use web
forms, then you could use a .NET assembly embedded on the web page
using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,

Boyd

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Joe | last post by:
Please repost answer message did not make it last time Hello, Joe here, wanted to get the 411 on this article. I posted in the FrontPage forum but there is never an answer. So I have come...
4
by: Mike Lundell | last post by:
lemee try this again, for today's date :)... .............. what's wrong with this, and .. can you not declare "char" variables? #include <iostream> int main() {
2
by: Ohaya | last post by:
Hi, We've been having a problem with one particular page that has a button on it, and a "tall" image (top-to-bottom). The button calls some simple Javascript to print the frame in which the...
1
by: Fresh Air Rider | last post by:
Hi Everyone Scenario A Webage has two dropdown lists, one for Suppliers and one for Products. When a user selects a supplier, it then populates the Products dropdown list with the relevant...
0
by: rawCoder | last post by:
Hi All, This is a repost of 'Disable DataGrid AutoScroll of 3/7/2005' Its related to "WinForm DataGrid" HOW can i force the grid NOT to Auto Scroll to the ( newly added item OR last...
3
by: Adam | last post by:
I've posted about this previously, but failed to receive a satisfactory response, so have included a code sample: I am trying to receive messages from an HTML viewer control in compact.net (c#),...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
5
by: Adrian Parker | last post by:
I've got the standard SqlCacheDependency working just fine , ie. I've defined (and encrypted) the connectionStrings section in the web.config, and I've also defined an an sqlCacheDependency in the...
2
by: Gerry | last post by:
I have a combo box and I can populate it with my class of dat (the class allows me to store each userid,username called - see code below I want the user to select the dropdown and see the...
2
by: Raj | last post by:
Hi, I have the following problem. I am displaying and printing a PDF file that is generated by my Application server. The print dialogs comes up correctly for the small PDF for the larger PDFs...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.