none
C# code for getting the attributes of the images stored in a doc file RRS feed

  • Question

  • Hello all,

          I am working on an interest based project which requires me to extract the attributes of the images stored in a *.doc file.

    Is anyone aware of the way(s) to do this?

     

    thanks!

    -moheetB

    Monday, September 19, 2011 11:11 AM

Answers

All replies

  • for a docx file rather.

    thanks!

    -moheetB

    Monday, September 19, 2011 11:37 AM
  • Hi,

    Could you elaborate your scenario with an example. You need attributes in the sense "like filename','Last created date..etc or anything other than that?

    Looking forward to hear form you.

    Regards,

    A.Murugan


    If it solved your problem,Please click "Mark As Answer" on that post and "Mark as Helpful". Happy Programming!
    Monday, September 19, 2011 12:11 PM
  • Hi moheet8,
    Welcome to the MSDN forum!

    I’ve moved the thread to the current forum for better support.

    Thank you for your understanding and have a nice day!


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 21, 2011 9:28 AM
    Moderator
  • Images in a document are stored as either a Word.Shape or Word.InLineShape object. Using those two objects you can refine a search to determine if the individual shape type is a Picture and from there investigate its various attributes.

    Hope this helps


    Kind Regards, Rich ... http://greatcirclelearning.com
    • Proposed as answer by Liliane Teng Friday, September 23, 2011 10:12 AM
    • Marked as answer by Liliane Teng Monday, September 26, 2011 10:14 AM
    Wednesday, September 21, 2011 12:54 PM
  • Hi moheet8,

    Rich's suggestion is helpful. In addition, below links are more information for Word.Shape and Word.InLineShape, please check:

    http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.inlineshape.aspx
    (InlineShape Interface)

    http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.shape.aspx
    (Shape Interface)

    If you have any concerns, please feel free to follow up.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by moheetB Friday, December 23, 2011 6:25 PM
    Friday, September 23, 2011 10:12 AM
  • Hi again, 

        There's an additional requirement of getting the information about the images that are set with behind text layout option. With your suggested way, I was able retrieve individual images in the word file and their attributes. But, I could not do the same ( use InlineShape) for the images set behind the text.

    thanks!

    -moheetB 


    moheetB

    Friday, February 10, 2012 11:04 AM