Click here to Skip to main content
14,921,072 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to read a word document which contains text along with images in a line using c# and convert them to binary format

Please provide me some references for it

Let me explain my scenario i have a word document(Question paper) contains questions and answers

like Ex:if we look at below link quesitons has text along with moleculer structure as images(in my word document).

http://www.mhpracticeplus.com/mcat_review/MCAT_Review_Smith.pdf[^]

so i have to read question (text and moleculer structure(image)) and i will convert it to binary format and save in Question column in database and options in options column.
Posted
Updated 31-Jul-14 19:44pm
v4
Comments
Maciej Los 31-Jul-14 6:28am
   
Do you have any specific problem?
Saikumar Guptha 31-Jul-14 7:26am
   
Thanks for reply,yes when i am reading word document only the text is available for reading images in between words are getting skipped.
finally i want to read line by line and save it in database as it is(text along with images)..Please reply

1 solution

You don't need to read Word document lin by line...

You should proceed with Word document in the same way you are doing it with *.zip, *.pdf, etc. There is no difference ;)


File Upload with ASP.NET[^]
storing uploaded files in a database with aspnet 2.0[^]
Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0[^]
How To Read and Write BLOB Data by Using ADO.NET with Visual C# .NET[^]
How to insert binary data (like images/documents) into a SQL Server database with SQL Server Management Studio?[^]
Storing a word document in sql server[^]


[EDIT]
OK, here is an idea how to read embeded MS Word document images.
Working with Word 2003 Images Programmatically[^]

Follow above links to find out how to read and write BLOB data (i.e.: images).

[/EDIT]
   
v2
Comments
_Amy 31-Jul-14 11:29am
   
I don't think OP is seeking the same.
Saikumar Guptha 1-Aug-14 1:22am
   
yes i have updated my question so my requirement will be clear to u,please refer it and reply with relevant answers thank you.
Maciej Los 1-Aug-14 1:58am
   
Updated ;)
Saikumar Guptha 1-Aug-14 2:15am
   
i have gone through ur link its just extracting images from word document.
Isn't it possible to read text and images at at time as a stream of bytes to save as it is in database column.
Saikumar Guptha 1-Aug-14 5:15am
   
Any answers.?
_Amy 1-Aug-14 3:23am
   
Exactly. +5! :)
Maciej Los 1-Aug-14 6:14am
   
Thank you, Amit ;)
Saikumar Guptha 1-Aug-14 7:58am
   
Any Solution is there for my problem..? Please just guide me so that i can move forward inthis issue..thanks Maciej Los and amit

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



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