Solved

How to find numebr of images in word document using c#

Posted on 2014-10-08
2
148 Views
Last Modified: 2014-10-14
Hi Team,

I have word document.In that i am trying to find out number of images present using c# code.

Can u plz provide code how to do?
0
Comment
Question by:mannevenu26
2 Comments
 
LVL 8

Accepted Solution

by:
johny_bravo1 earned 500 total points
ID: 40371159
Check this. Haven't tested

 object missing = Type.Missing;
        object FileName = Server.MapPath("~/Folder/MyWord.docx");
        object readOnly = true;
        m_word = new Application();
        m_word.Documents.Open(ref FileName,
                                ref missing, ref readOnly, ref missing, ref missing,
                                ref missing, ref missing, ref missing, ref missing,
                                ref missing, ref missing, ref missing, ref missing, ref missing,ref missing,ref missing);

int imgCount = m_word.ActiveDocument.InlineShapes.Count;
0
 

Author Comment

by:mannevenu26
ID: 40376419
can u plz give full example
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
2 questions 10 25
ASP.NET MVC identity 6 26
C# Gridview 1 31
How come this regular expression allows "e"? 14 36
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question