![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
When you record a macro you will get a lot of code that you don't need. That code can safely be deleted.
As you didn't move the selection after adding the new paragraph your subsequent code was executed on the original selection. When you post code in a question here you need to use the code format button (#) The only code you actually need is below. Code:
Sub PastePictureAndCenter()
Dim target As Range
Set target = Selection.Range
With target
.ParagraphFormat.KeepWithNext = True
.InsertParagraphAfter
.Move wdParagraph
.Style = ActiveDocument.Styles("OAR Para No Ind for Picture")
.Paste
.InlineShapes(1).Line.Visible = msoTrue
End With
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Wrap Text Inside Picture
|
marconexcel | Drawing and Graphics | 2 | 02-02-2018 05:01 PM |
Wrap TABLES around picture?
|
ShankedS | Word Tables | 2 | 11-16-2015 04:27 PM |
Format Picture toolbar button not working in Word 2007
|
WaltR | Word | 2 | 08-19-2015 05:19 PM |
| How do you paste a graph from Excel into Word as picture without line appearing? | swygant | Word | 10 | 07-01-2014 03:23 PM |
"format picture" - arrows show as no line atop picture
|
marbeth | Word | 3 | 07-08-2011 02:16 PM |