473,406 Members | 2,371 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,406 software developers and data experts.

starting word from asp.net

I am trying to load Word Object to do some VBA automation within my ASP.NET
webservice. I understand it is not recommended but it will only ocassionally
used. I am not able to create the object. I get the following error
System.Exception occurred in Microsoft.VisualBasic.CreateObject
Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)

I am working on WIndows XP machine.

The webconfig for asp.net app is:
"
<authentication mode="Windows" />
<identity impersonate="true" />
<deny users="?" />
<allow users="*" /> <!-- Allow all users -->
"

IIS directery has security set at low and all read/write/ execute options
enabled. The code works fine in a VB form. Also I am able to load an excel
application without any problems. It is not a registeration issue since I get
the same problem on other machines too.
The code snippet:
"
Imports System.Runtime.InteropServices.Marshal

Public Class TWordObj
Public Sub CreateLabels()

Dim oApp As Word.Application
Dim oDoc As Word.Document

'Start a new document in Word
oApp = CType(CreateObject("Word.Application"), Word.Application)
oDoc = oApp.Documents.Add
"
Any help will be apreciated.
Was this post helpful to you?

Why should I rate a post?


Nov 19 '05 #1
0 959

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

Similar topics

2
by: Jason Charalambides | last post by:
Hello, My question is: How do I get my application to start by double clicking on a file. I have made my application to save files with a specific extension. I associated those files to my...
4
by: Adam | last post by:
Eh, probably not the most specific subject line... But, I've got a number of fields in which I need to do things like remove the first 4 characters, or remove the last 3. Such as: ...
1
by: Bernd Muent | last post by:
Hi together, I am using the following code in Visual Basic to open Word or Excel applications: Word: Dim w As Word.Application w = CType(CreateObject("Word.application"), Word.Application)...
2
by: Richard Loupatty | last post by:
I tried to start winword.exe from an aspx (after granting things with dcomcnfg) and i can see winword.exe showing up in the taskmanager, but i don't see the word-application itself. I did set...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
19
by: Ahmer | last post by:
Hi all! I am a 15 year old High School Sophomore. I would like to start programming in Python. In school, we are learning Java (5) and I like to use the Eclipse IDE, I also am learning PHP as...
6
by: xzzy | last post by:
In the follwoing code, myProcess.StartInfo.FileName is set to a valid path: c:\\hello.doc The code produces the following error message: "%1 is not a valid Win32 application" For...
4
by: vikerneso | last post by:
I'm trying to write a program that would take a text file and searched for every word starting with a user specified letter. i.e. user inputs 'a' the program searches through the text file and...
34
by: Umesh | last post by:
I want to extract a string abc*xyz from a text file. * indicates arbitrary no. of characters. I'm only able to do it when the string has definite no. of characters or the string length is...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.