Macro To Updat .dot File With Variable Data And Save In Specific Folder

  • Hi,


    I am working on a project where I need to work with Excel and word templates.
    I have attached sample files to have clear understanding of what I am supposed to do.
    I update Excel sheets with Plan type/ Plan No /Member's Name / DOB /RET Date and Current fund value using userform (this part is done)
    The sheet then calculates Projected Fund based on plan type / DOB /RET Date ( This is done too)
    now what I need to do is to use Macro which would do following:
    Use these data in Excel to create a quote in predefined word template and save the same in a folder using plan no. as a .doc file


    I have attached a sample word template (saved as .doc instead of .dot) for your refrence. I have no idea what are word templates how they are made, how they work and how can we export data from excel to these templates.


    Would be great if someone can help me on how to go ahead on this. Also if you could provide me with links to learn more about word templates

  • Re: Macro To Updat .dot File With Variable Data And Save In Specific Folder


    Hi Anupam


    The following code should be a good starting point for you it adds all the details into the word document by bookmark references and then saves the word document as the plan no.
    Please refer to the attached workbook for a working example


  • Re: Macro To Updat .dot File With Variable Data And Save In Specific Folder


    thanks Hooimeyer


    i am getting run time error 429 " ActiveX Component Can't create object"


    For code

    Code
    Set wdApp = GetObject(, "Word.Application")

    [SIZE="4"]Anupam Shrivastava[/SIZE]
    :smokin:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!