Results 1 to 20 of 22

Thread: Macro for replacing EXCEL data into WORD

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    VBAX Newbie
    Joined
    Nov 2014
    Posts
    4
    Location
    Quote Originally Posted by Robxk View Post
    Hi

    Managed to get this working.

    .Replacement.Font.Bold = True


    Regards

    Robert
    Hi.

    For some reason I can't get this to work?
    My code looks like this:

    With ActiveDocument.Range
                With .Find
                    .ClearFormatting
                    .Replacement.Font.Bold = True
                    .MatchWholeWord = True
                    .MatchCase = True
                    .Wrap = wdFindStop
                    .Text = Split(xlFList, "|")(i)
                    .Execute
                     'To automatically change the found text:
                     '• comment-out/delete the previous line and the Do While Loop
                     '• uncomment the next two lines
                     '.Replacement.Text = Split(xlRList, "|")(i)
                     '.Execute Replace:=wdReplaceAll
                End With
    I'm new to all this VBA coding so there is a big chance I have put the section the wrong place.

    Best Regards Rasmus.
    Last edited by SamT; 11-26-2017 at 02:49 PM.

Posting Permissions

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