Consulting

Results 1 to 3 of 3

Thread: Autofill Macro from EXCEL to WORD

  1. #1

    Talking Autofill Macro from EXCEL to WORD

    Hello,

    I'm completely new using VBA, macros and programming as a whole. I'm trying to make a macro that replaces some predefined words from a *.doc document with values (in this case words) of a cell from an excel-sheet.

    My aim is to have an automation for an excel-sheet with the data as shown below. And a form/application/some ms-word document that needs to be fill out.

    FIST_NAME MIDDLE_NAME LAST_NAME D.O.B

    The macro will just replace the values entered in the excel-sheet to the *.doc document.

    Can someone please help me with this? Thank you.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    IF you want to Replace a string then you need a Find string.

    'FindReplace Text
    ' http://www.excelforum.com/excel-prog...-ms-excel.html
    ' Multiple Find/Replace
    ' http://www.excelforum.com/excel-prog...o-to-word.html
    ' Single Find/Replace
    ' http://www.vbaexpress.com/forum/showthread.php?t=38958

  3. #3
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    I think you should look at the mailmerge method in Word.
    You can link the Excel file to the Word file and insert ('replace') the Excel data in the Word document.

Posting Permissions

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