Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    Kent, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello everyone

    You may think this a weird ask, but I would like to do a sort of mail merge.

    I have about 180 records in a spreadsheet and I would like to merge it into notepad or something to create 180 html pages each identical except for the merge data. I guess this can be done with VBA. I have some experience of VBA, and usually get inspiration (yeh-huh) for code by googling, but I haven't yet found the right search criteria for what I would like to do. I am quite open to the possibility that I am trying to do this the hard way.

    If anyone could help me out, I would be most grateful.

    Emily

    P.S. I am using Office 2007.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by emilyo View Post
    I would like to do a sort of mail merge.

    I have about 180 records in a spreadsheet and I would like to merge it into notepad or something to create 180 html pages each identical except for the merge data. I guess this can be done with VBA.
    ...
    P.S. I am using Office 2007.
    How about using MS Word's mail merge feature? Apply the Plain Text style to the body of the Word document and use Paste Special to paste in your HTML template. Then populate the merge fields, save your main document, and give it a test. Eventually, you will end up with all your HTML pages in Word. Now here's the trick: how to save out the individual pages as plain text rather than as Word documents. There are macros out there that save the pages as Word documents, and hopefully you would just need to change the format and file extension in the code. Worth a try.

  3. #3
    New Lounger
    Join Date
    Feb 2010
    Location
    Calgary Alberta Canada
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have done something similar in the past using data from an excel spreadsheet. I used XML and XSL to produce the desired outcomes. If your dealing with strictly data, and there is no charting or graphs in your excel, then the XML solution is worth exploring. In my case, I have a Web site on an Intranet that is total driven by EXCel spreadsheets that are XML files that are updated with excel and formated for publishing on the Intranet using XSL.
    XSL form

Posting Permissions

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