![]() |
|
|
|
#1
|
||||
|
||||
|
If you insert such an object in the document, then Cut it (and, presumably, the paragraph break following it) from there to place it in the clipboard, you could use Find/Replace, where:
Find = empty, but Heading 1 Style specified Replace = ^&^c A macro to do the same thing: Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = "^&^c"
.Format = True
.Forward = True
.Style = wdStyleHeading1
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Replace Embedded Objects with Linked Objects
|
hicksi | Word | 3 | 09-29-2021 07:17 PM |
| Locking styles in Word using VBA to restrict new styles | cadillac1206 | Word VBA | 1 | 04-21-2020 01:08 AM |
| Accessing word objects | Erdanova | Excel | 2 | 12-12-2019 06:11 AM |
Macros to move objects prevents moving same objects with arrow keys
|
BruceM | Word VBA | 1 | 03-10-2015 08:20 AM |
Convert equation objects to inline objects
|
sumjoh | Word VBA | 1 | 01-29-2013 08:38 PM |