We help IT Professionals succeed at work.

Copy all bold text to clipboard

pweber_ep
pweber_ep used Ask the Experts™
on
Hello,

Is there a VBA method to copy all bolded text in a Word document to the clipboard?
I have reviewed some of the posts for copying bolded excel cells, but I am enough of a newbie that I cannot translate to word.

Thanks,
Paul
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
you cannot copy the examples given for excel because each program has its own object model, have you tried to record a macro to find text that is in bold?  it is under the advanced options then at the bottom of the form under the format drop down list.
Retired
Top Expert 2012
Commented:
You could start with this macro.
Sub CopyBold()
Dim rng As Range

Set rng = ActiveDocument.Range
With rng.Find
    .Font.Bold = True
    Do While .Execute
        rng.Copy
        'your paste routine here
        rng.End = ActiveDocument.Range.End
    Loop
End With
End Sub

Open in new window