473,396 Members | 1,894 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,396 software developers and data experts.

Word Document and ASP.net

Dear All,

Actually I am trying to open a word document in my ASP.net application.
I
am using the following code in Form Load Event:

Dim oWord As New Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Add

I am geting an error of Access denied. I have installed Primary Interop
Assemblies (PIAs) for Office XP and also have added reference (COM Library)
But still I am geting this error I know that I have to setup some sort of
permissions. But dont know where.

Any help would be greatly appreciated.

Cheers,
Sunil Sabir

Nov 19 '05 #1
5 2180
"Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com...
Dear All,

Actually I am trying to open a word document in my ASP.net application. I
am using the following code in Form Load Event:

Dim oWord As New Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True


Since this code is running on the server, what do you expect it to do?
Nov 19 '05 #2
Dear Tom,

Thanks for your reply. So what would be the solution for this.

Any help would be greatly appreciated.

"Tom Kaminski [MVP]" wrote:
"Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com...
Dear All,

Actually I am trying to open a word document in my ASP.net

application.
I
am using the following code in Form Load Event:

Dim oWord As New Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True


Since this code is running on the server, what do you expect it to do?

Nov 19 '05 #3
Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Dear Tom,

Thanks for your reply. So what would be the solution for this.


I won't offer a solution since running Office on the server in this way is
not supported. I would offer an alternative if you told me more about what
you're trying to do ...
Nov 19 '05 #4
Dear Tom,

Thanks for the reply. Actually I want to retrieve the database records and
display it
MS Word Document. Plus I want to add some extra things my Self.

Any help would be greatly appreciated.

cheers,
Sunil Sabir

"Tom Kaminski [MVP]" wrote:
Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Dear Tom,

Thanks for your reply. So what would be the solution for this.


I won't offer a solution since running Office on the server in this way is
not supported. I would offer an alternative if you told me more about what
you're trying to do ...

Nov 19 '05 #5
"Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:20**********************************@microsof t.com...
Dear Tom,

Thanks for the reply. Actually I want to retrieve the database records and
display it
MS Word Document. Plus I want to add some extra things my Self.

Any help would be greatly appreciated.


Here's an example using ASP:
http://support.microsoft.com/kb/270906/EN-US/

You could also just as well output HTML instead of RTF.
Nov 19 '05 #6

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

Similar topics

4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
8
by: Asma | last post by:
Dear Sir, I am trying to find a way to open a Word document using C language and read the text of word doc into a variable. (Turbo C on Dos 6.0). Can anyone please tell me which libraries in...
3
by: Adam Faulkner via DotNetMonster.com | last post by:
I want to create a method within a class that opens a Microsoft Word 2000 Document and has the facility to Create a new word document and then extract a Page that exists within the original Word...
1
by: Adam Faulkner via DotNetMonster.com | last post by:
I had a problem before extracting pages from an existing word document and then inserting the content into a new word document. The following code below works with Microsoft Word 2000 Function...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
0
southoz
by: southoz | last post by:
Good ay all , I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information...
8
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
14
by: Alan T | last post by:
These are the codes I created a document: _WordApp = new Interop.Word.Application(); _WordApp.Visible = false; _WordDoc = new Document(); _Missing = System.Reflection.Missing.Value;
2
by: uamusa | last post by:
I am Dynamically generating a proposal(report) in MS Word. By default the Paragraph Alignment is "Left". For the First 6 Paragraphs I set the Alignment to "Center", and then when attempting to...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...

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.