Results 1 to 7 of 7
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    6
    Does anyone have any ideas how to merge a 100 page word document into 100 html pages using a WM template?

    Since you export from Word into a txt format I guess the general question is can WM be used to merge txt documents

  2. #2
    ABW Ambassador buy_online's Avatar
    Join Date
    January 18th, 2005
    Location
    Richmond, VA
    Posts
    3,234
    Whatever you do, don't tell word top save as a "Web Page," the resulting code dump will kill everything for miles around.

    Seriously though, you'll have to find a way to tell WebMerge what to separate the data by. I don't know enough about what's in your Word doc to help with a good answer.

    Can you tell us what the data is, or how it might be separated (address, product name etc.)?

    Fred

  3. #3
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Kenmerge:
    Does anyone have any ideas how to merge a 100 page word document into 100 html pages using a WM template?

    Since you export from Word into a txt format I guess the general question is can WM be used to merge txt documents <HR></BLOCKQUOTE>

    This is not straightforward, as WebMerge is set up to handle columnar formats like tab-delimited or comma-delimited, which use return characters to dilimit records.

    I can look into adding a means of specifying record delimiters in the future; if I did that then you could export as plain text with page breaks and use the page break character as the record delimiter.

    To be honest, though, I don't get many requests for that so it may not be a high priority relative to the things folks are clamoring for here.

    What's in the document? I wonder if there's another way we might accomplish this, like maybe moving it into MS Access first and then exporting from there for publishing with WebMerge....
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    413
    Before WebMerge I used a convoluted combination of WordPerfect, Paradox, and a Word Macro to create WebPages. This process involved a WordPerfect template and merging data from an imported Paradox database. I would end up with one very large text file (of raw HTML code) that contained 6,000+ pages.

    My next step was to save those files individually as WebPages. Some kind soul in an online discussion group sent me a macro to run within Word to save each page as a separate file. In order for this to work, however, the first line at the top of each page has to be the file name, so this may not be appropriate to your situation.

    The Macro selects a page, opens a new document, pastes the copied page into the new document, saves the new page using the first line as the file name, highlights the first line, deletes the first line, re-saves to page, deletes the document, and then returns to the original document to start the process over again. It only takes a couple of minutes to create several thousand WebPages.

    If this is what you are looking for, then the macro below may be helpful. Of course, you may need to tweak this to fit your needs.

    EXTRACT PAGE WORD MACRO

    Sub ExtractPage()
    Dim i As Integer
    Dim iNumPages As Integer
    Dim sCurrentDoc As String

    sCurrentDoc = ActiveDocument.Name
    'Get the current document's name
    iNumPages = ActiveDocument.ComputeStatistics(wdStatisticPages)
    'Get the number of pages
    For i = 1 To iNumPages
    'For as many times as there are pages
    Selection.GoTo What:=wdGoToPage, which:=wdGoToAbsolute, Count:=i
    'Goto pagenumber i
    Selection.GoTo What:=wdGoToBookmark, Name:="\Page"
    'Select this page
    Selection.Copy
    'Copy the selection
    Documents.Add
    'Add a new document
    Selection.Paste
    'Paste
    ActiveDocument.SaveAs , FileFormat:=wdFormatText
    'Save the new document using first line as file name
    Selection.HomeKey Unit:=wdStory
    ' Go to Top of Page
    Selection.EndKey Unit:=wdLine, Extend:=wdExtend
    ' Highlight first line
    Selection.Cut
    ' Delete first line
    ActiveDocument.SaveAs , FileFormat:=wdFormatText
    ' Save File Again
    ActiveDocument.Close
    'Close this new document
    Documents(sCurrentDoc).Activate
    'Activate the document where we started from
    Next i
    End Sub

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    6
    Basically I own the copyright to a 600 page document on a certain subject, I want to publish the document on my website to provide extra search engine content. The document is in Word format so I have access to and can edit/add a header and/or footer to each page which I hope should enable me to add a delimiter and seperate the data into pages. I'm only interested in keeping the text of the document, images etc are not required.

    It does not need to be perfect, the idea is that if the surfer likes the content they will buy the pdf version ebook of the content.

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by buy_online:
    Whatever you do, don't tell word top save as a "Web Page," the resulting code dump will kill everything for miles around.

    Seriously though, you'll have to find a way to tell WebMerge what to separate the data by. I don't know enough about what's in your Word doc to help with a good answer.

    Can you tell us what the data is, or how it might be separated (address, product name etc.)?

    Fred <HR></BLOCKQUOTE>

  6. #6
    Newbie
    Join Date
    January 18th, 2005
    Posts
    6
    Hi Richard,

    the document is basically 600 pages of plain text, do you know if Access can handle that as I don't have a lot of experiance with it.

    Would this process work...

    Word &gt;export into Access format &gt;export into tab format &gt; inport into WM ?

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Fourth World:
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Kenmerge:
    Does anyone have any ideas how to merge a 100 page word document into 100 html pages using a WM template?

    Since you export from Word into a txt format I guess the general question is can WM be used to merge txt documents <HR></BLOCKQUOTE>

    This is not straightforward, as WebMerge is set up to handle columnar formats like tab-delimited or comma-delimited, which use return characters to dilimit records.

    I can look into adding a means of specifying record delimiters in the future; if I did that then you could export as plain text with page breaks and use the page break character as the record delimiter.

    To be honest, though, I don't get many requests for that so it may not be a high priority relative to the things folks are clamoring for here.

    What's in the document? I wonder if there's another way we might accomplish this, like maybe moving it into MS Access first and then exporting from there for publishing with WebMerge.... <HR></BLOCKQUOTE>

  7. #7
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Kenmerge:
    Hi Richard,

    the document is basically 600 pages of plain text, do you know if Access can handle that as I don't have a lot of experiance with it.

    Would this process work...

    Word &gt;export into Access format &gt;export into tab format &gt; inport into WM ?
    <HR></BLOCKQUOTE>

    Yep, that should do it. I believe Access has the means to import based on a custom record delimiter, so if you can find out what character Word uses when you export as "Text with pae breaks" you should be able to bring that into Access with no trouble.

    Once in Access, a straight export as tab-delimited or CSV should work great with WebMerge.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  8. Newsletter Signup

Closed Thread

Similar Threads

  1. Merging Column data in Excel
    By bkotamballi in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: January 2nd, 2008, 11:23 PM
  2. Tips on merging multiple feeds?
    By meleemel in forum WebMerge (Fourthworld.com)
    Replies: 3
    Last Post: December 31st, 2006, 06:10 PM
  3. Merging accounts
    By PatrickAllmond in forum Search Engine Optimization
    Replies: 3
    Last Post: September 27th, 2006, 11:08 PM
  4. merging columns in excel
    By suzigeek in forum Programming / Datafeeds / Tools
    Replies: 15
    Last Post: July 26th, 2004, 02:59 PM
  5. Handspring merging with Palm
    By ronwls in forum Rakuten LinkShare - LS
    Replies: 5
    Last Post: November 29th, 2003, 08:36 AM

Posting Permissions

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