![]() |
#1
|
|||
|
|||
![]() I am trying to add a macro that will find an image and insert a paragraph break before that image. My documents contain at least 100 images each, so doing this manually is too time consuming. I'm not familiar with writing macros - I just know how to use them... Help? ![]() |
#2
|
||||
|
||||
![]()
Assuming the graphics are placed inline, the following macro would do it
Code:
Sub AddParasBeforeImages() Dim aPict As InlineShape For Each aPict In ActiveDocument.InlineShapes aPict.Range.Paragraphs(1).Range.InsertBefore vbCr Next aPict End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
![]()
I wasted my time answering this in another forum - https://social.msdn.microsoft.com/Fo...s?forum=isvvba.
If you must post in a variety of forums, please cross post correctly.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
![]()
Well, thank you, gmayor, as your find/replace with a wild card worked. I will also be keeping the macro that Guessed suggested on file for future use. I really appreciate both of you taking the time to answer my question, as I spent my entire work day yesterday manually putting in paragraph breaks...
I apologize for the multiple forum posts. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
lyle | Word | 1 | 02-11-2014 03:57 AM |
Images disturbing paragraph shading behind | younggun | Word | 0 | 10-12-2013 04:35 AM |
Records paragraph break | ervilhaman | Mail Merge | 14 | 04-09-2013 02:55 PM |
i want to insert page break without repeat row on top | gsrikanth | Excel | 0 | 05-24-2012 04:07 AM |
URGENT: Mail 'Merge To New Doc' restarts paragraph numbering at each Section break | JamesF | Mail Merge | 0 | 07-28-2011 07:26 AM |