Hallo.
I'm trying to create word document from ASP.NET and I don't have problem.
The problem is when I try to close, destroy Word.ApplicationClass instance.
First row of example below start two processes. I can see in Task Manager
two inctances of WINWORD.EXE.
Would someone explain me that, or please send some URL related with this
question.
With last row of example I can close/kill one WINWORD.EXE process but
another one is still in memory. I don't know how to close this process from
code. Would you help me please about this?
best regards
Vasil Buraliev
example:
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
object missing = System.Reflection.Missing.Value;
object readOnly = false;
object fileName = Server.MapPath("worddoc.doc");
object isVisible = true;
Word.Document oWordDoc = oWordApp.Documents.Add(ref missing, ref missing,
ref missing, ref isVisible);
oWordDoc.Activate();
oWordApp.Selection.TypeText("Нема проблем ни со кирилица.");
oWordApp.Selection.TypeParagraph();
oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref
missing, ref missing,
ref readOnly, ref missing, ref missing, ref missing, ref missing, ref
missing, ref missing,
ref missing, ref missing, ref missing);
oWordApp.Application.Quit(ref missing, ref missing, ref missing); 2 5107
Word automation is a powerful tool to generate documents but it is
also inherently vulnerable to many configuration issues. Many
conditions will provoke multiple instances getting "stuck" in memory,
and you will find the same code behaving differently on different
computers.
You might want to investigate XpertDoc as an alternative solution. It
creates genuine MS-Word documents without making any call to the
MS-Word application, making it more reliable, much faster and easier
to deploy and support.
You can check it out at www.xpertdoc.com.
"Vasil Buraliev" <ph*****@mol.com.mk> wrote in message news:<uT**************@TK2MSFTNGP10.phx.gbl>... Hallo. I'm trying to create word document from ASP.NET and I don't have problem. The problem is when I try to close, destroy Word.ApplicationClass instance. First row of example below start two processes. I can see in Task Manager two inctances of WINWORD.EXE. Would someone explain me that, or please send some URL related with this question. With last row of example I can close/kill one WINWORD.EXE process but another one is still in memory. I don't know how to close this process from code. Would you help me please about this?
best regards Vasil Buraliev
example:
Word.ApplicationClass oWordApp = new Word.ApplicationClass(); object missing = System.Reflection.Missing.Value; object readOnly = false; object fileName = Server.MapPath("worddoc.doc"); object isVisible = true; Word.Document oWordDoc = oWordApp.Documents.Add(ref missing, ref missing, ref missing, ref isVisible); oWordDoc.Activate(); oWordApp.Selection.TypeText("Нема проблем ни со кирилица."); oWordApp.Selection.TypeParagraph(); oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); oWordApp.Application.Quit(ref missing, ref missing, ref missing);
"Francis Dion" <ut**@xpertdoc.com> wrote in message
news:d6**************************@posting.google.c om... Word automation is a powerful tool to generate documents but it is also inherently vulnerable to many configuration issues. Many conditions will provoke multiple instances getting "stuck" in memory, and you will find the same code behaving differently on different computers.
You might want to investigate XpertDoc as an alternative solution. It creates genuine MS-Word documents without making any call to the MS-Word application, making it more reliable, much faster and easier to deploy and support.
You can check it out at www.xpertdoc.com.
"Vasil Buraliev" <ph*****@mol.com.mk> wrote in message
news:<uT**************@TK2MSFTNGP10.phx.gbl>... Hallo. I'm trying to create word document from ASP.NET and I don't have
problem. The problem is when I try to close, destroy Word.ApplicationClass
instance. First row of example below start two processes. I can see in Task
Manager two inctances of WINWORD.EXE. Would someone explain me that, or please send some URL related with this question. With last row of example I can close/kill one WINWORD.EXE process but another one is still in memory. I don't know how to close this process
from code. Would you help me please about this?
best regards Vasil Buraliev
example:
Word.ApplicationClass oWordApp = new Word.ApplicationClass(); object missing = System.Reflection.Missing.Value; object readOnly = false; object fileName = Server.MapPath("worddoc.doc"); object isVisible = true; Word.Document oWordDoc = oWordApp.Documents.Add(ref missing, ref
missing, ref missing, ref isVisible); oWordDoc.Activate(); oWordApp.Selection.TypeText("Нема проблем ни со кирилица."); oWordApp.Selection.TypeParagraph(); oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); oWordApp.Application.Quit(ref missing, ref missing, ref missing); This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike MacSween |
last post by:
tblCourses one to many to tblEvents.
A course may have an intro workshop (a type of event), a mid course
workshop, a final exam. Or any combination. Or something different in the
future.
At...
|
by: Yohancef Chin |
last post by:
Hi,
Being fairly new to .NET I am looking for a way to call
MS
Word from an event on a webform, and after the user is
finished save that created document to an SQL Server
database. Has anyone...
|
by: Mikey |
last post by:
Sample VB .NET source code to create mailing labels or customized letters
using MS Word MailMerge
This VB .NET source code will start MS Word and call methods and set
properties in MS Word to...
|
by: Dave |
last post by:
Apologies for the newbie question. I have created a vb.net program for
my company that is designed to work with Word Templates (about forty of
them that we commonly use) that are selected by the...
|
by: etuncer |
last post by:
Hello All,
I have Access 2003, and am trying to build a database for my small
company. I want to be able to create a word document based on the data
entered through a form. the real question is...
|
by: beanie |
last post by:
i am a c programming beginner and i am trying to Create a concordance of Word Count for a text File in c programming but my code isn't working.please can u help me out.here is my code:
#include...
|
by: beanie |
last post by:
i am a beginer in c programming and i am trying to Create a Concordance of Word Count for a Text File but my code is not working.pls can anyone helpme out.here is my code:
#include <stdio.h>...
|
by: alivip |
last post by:
I write code to get most frequent words in the file
I won't to implement bigram probability by modifying the code to do the following:
How can I get every Token (word) and ...
|
by: alivip |
last post by:
How can I get every Token (word) and PreviousToken(Previous word) From multube files and frequency of each two word
my code is trying to get all single word and double word (every Token (word) and...
|
by: dittytwo |
last post by:
Hi there
The below code works if you don't try to do anything to the word document
which is great (Not :D)
I am having problems with the context command both text (i.e initial document with no...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |