Results 1 to 3 of 3

Thread: Making one Macro execute in Excel then Word

  1. #1

    Making one Macro execute in Excel then Word

    Hey folks.
    I'm trying to get a macro in excel to run, then take the data the macro selects, put it into a word doc, and then have my word doc run a macro automatically. I used the record macro feature for both macros.

    Excel Macro:

    End Sub
    Word Macro:

    With Selection.Find
    .Text = "^t"
    .Replacement.Text = ", "
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    I'm very new to VBA. My job has us open an excel file, copy the range of cells listed in the macro above, then paste them in word and do a find all and replace. Ideally, I'd like to be able to just use one macro in excel to do the entire process. Any help is appreciated! The stuff I've found from google hasn't been helpful so far.
    Last edited by Aussiebear; 11-03-2022 at 05:05 PM. Reason: Added code tags to supplied code

  2. #2
    VBAX Sage SamT's Avatar
    Oct 2006
    Near Columbia
    Hone your Google-Fu. . .

    Open a Word DOC in Excel.
    I expect the student to do their homework and find all the errrors I leeve in.

    Please take the time to read the Forum FAQ

  3. #3

Posting Permissions

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