A
aychai
Hi all,
I have a scenario where users fills in textbox fields on ASP.NET page
from the server and when he/she clicks on a download button, the data
from fields will insert into an existing word template.
The user will then be asked whether to save as or open the word
document on his client machine.
Question1)Is there a way to manipulate the word document in memory
without having to save it onto server's disk?
Currently, I am using the Word class from Microsoft Word 11.0 object
library to open existing word template, insert data into bookmark
location, and save as new document on the server. Then I open the file
and send the file for user to download through Response.WriteFile().
This method works, but it requires a physical document to be created
everytime.
Question2)How do I check the file lock to see if other process is
finished with the file and my application can go ahead and write to it
(in C#)? If there's some sample code for checking that, it will be
great!
Thanks abunch!
Anthony
I have a scenario where users fills in textbox fields on ASP.NET page
from the server and when he/she clicks on a download button, the data
from fields will insert into an existing word template.
The user will then be asked whether to save as or open the word
document on his client machine.
Question1)Is there a way to manipulate the word document in memory
without having to save it onto server's disk?
Currently, I am using the Word class from Microsoft Word 11.0 object
library to open existing word template, insert data into bookmark
location, and save as new document on the server. Then I open the file
and send the file for user to download through Response.WriteFile().
This method works, but it requires a physical document to be created
everytime.
Question2)How do I check the file lock to see if other process is
finished with the file and my application can go ahead and write to it
(in C#)? If there's some sample code for checking that, it will be
great!
Thanks abunch!
Anthony