Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have developed asp.net based Diagnostic Application,that I have one table Name Histopath(id,gross_appearance,dx,appearance)
I have a MS doc file name sample.doc.
sample.doc will receive 4 parameter(patient_id,name,Dr_name,contact_no)from UI under button event.
This sample.doc contain other text file also.
Firstly I want to save this 4 parameter into sample.doc,copy this data and save it another file and file name will be according patient_id.


N.Bnew file will be generate each and every time under event click and I have to search file from folder according patient_id.(Is it better to use XML in this criteria)
Any help make me grateful.
Masud
Posted
Comments
Dylan Morley 8-Jul-10 5:22am    
So what bit are you struggling with? Post some code that's problematic & I'm sure someone can have a look.

1 solution

If you want to use XML in this case then your template file should be stored in xml format (sample.xml).

If you want to work with Word 2003 then
1. Create an XML Schema based on your template
2. Attach the XML Schema in your word document
3. use word automation to replace the schema content by xquery

If you want to work with Word 2007 then
1. Create an XML Schema based on your template
2. Attach the XML Schema in your word document
3. use Open XML SDK to replace the schema content by xquery

See this [Generating Word Reports / Documents] and [http://blogs.msdn.com/b/brian_jones/archive/2010/02/26/open-xml-sdk-office-services-better-together.aspx]
 
Share this answer
 
v2
Comments
Mahmudunnabi 8-Jul-10 7:31am    
how can i transfer data into word from .aspx file.
Prosanta Kundu online 8-Jul-10 8:14am    
Read the data of webform in postback and substitute the template schema value.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900