+ Reply to Thread
Results 1 to 2 of 2

Delete all paragraphs containing a particular image using a VBA macro in MS Word

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    17

    Delete all paragraphs containing a particular image using a VBA macro in MS Word

    I have a word file with some sentences which begin with a particular image/icon/picture (the desktop icon). I use a VBA-macro to perform certain changes in the document. I want to delete all the statements/sentences/paragraph which begin with this particular image in the document? (may be by using the image properties like height=0.34' and width=0.34'etc or by comparing the image with its own locally saved image) please help !

  2. #2
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Delete all paragraphs containing a particular image using a VBA macro in MS Word

    There is no way for a macro to determine an image's content, so all you could do is check the dimensions. Any variation in the dimensions though, would invalidate the code. Also, you'd need to handle inlineshapes differently from shapes.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Insert Image in Mac Word 2011 Using Macro
    By jmsn1 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 07-28-2013, 05:18 PM
  2. [SOLVED] Moving paragraphs from MS Word to Excel
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 03-01-2005, 11:08 PM
  3. [SOLVED] How to select the first 5 paragraphs in a Word Document from Excel
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2005, 12:06 PM
  4. Display Word Paragraphs in Excel???
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1