Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing Large Word File (Access XP)

    I have a very large 365mb word document that I would like to import into access. I've tried to open it in Word and save as a txt but it take forever. Any ideas will be appreciated

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Importing Large Word File (Access XP)

    365 MB is extremely large for a Word document. What in heaven's name do you want to do with it in Access?

    If you want the user to be able to read the document, provide a hyperlink.
    If the document contains a table that you want to convert to an Access table, try copying just the table to the clipboard.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing Large Word File (Access XP)

    Hans thanks for the reply. An ledger was printed to Word and now they want to bring it back to do calculations on the ledger. I need to change the Word Doc to a txt or csv & then try and summaries the "ledger" in Access.

    Do you know of any converter between Doc to Txt. Wordpad and Notepad just bailes out.

    Thanks for any ideas

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Importing Large Word File (Access XP)

    A 365 MB ledger in a Word document is utterly bizarre. What were they thinking? I fear that any converter will choke on this. Your best bet may be to chop the document into chunks that the standard export or copy & paste can handle, then import and then merge the chunks in Access.

  5. #5
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing Large Word File (Access XP)

    Are there a way of selecting a range in Word without holding down the shift key and selecting each page. A combination of GOTO & Bookmarks with still maintaining the selected text in between. I'm already tired of keeping down the shift and pagedown key.

    Thanks for any help

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Importing Large Word File (Access XP)

    There aren't any cheap ones. DataJunction can probably handle it, but it is rather pricey.
    Charlotte

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Importing Large Word File (Access XP)

    Click at the beginning and shift+click at the end. You don't have to keep the shift key down in between.

    Or enter Extend mode by pressing F8. Clicking will extend or reduce the selection. You can turn Extend mode off by pressing F8 again.

  8. #8
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing Large Word File (Access XP)

    Thanks for all the tips. With a friends help I've put together the following macro in Word in order to change the doc to txt file. BUT my no of sentences is 4 000 000. I've run the macro overnight (14 hours) but it only did till line 51000 sofar. My PC's CPU is a Pent4 2.4 with 768 RAM & 4.8 Gig H/Drive space. Are there anything else I can do to improve the time it will take to finish the job. In the code I'm only extracting the lines I need. See the macro attached.

    Sub RunMacros()

    Dim dblLast, dblThis As Long
    Dim strLine As String
    Dim a, b, c, d As Long
    b = 1
    d = 1
    dblLast = ActiveDocument.Sentences.Count
    For a = 1 To dblLast Step 10000
    If a > 1 Then
    Open "C:SapGL" & a - 10000 & "to" & a & ".txt" For Output As #1
    For c = d To a - 1
    strLine = ActiveDocument.Sentences©.Text
    If Mid(strLine, 10, 1) = "*" Then GoTo DontWrite
    If Mid(strLine, 4, 5) = "OKBBT" Then GoTo DontWrite
    If Mid(strLine, 3, 8) = "NNMLMR04" Then GoTo DontWrite
    If Mid(strLine, 61, 18) = "LEDGER TRANSACTION" Then GoTo DontWrite
    If Mid(strLine, 4, 6) = "SOURCE" Then GoTo DontWrite
    If Mid(strLine, 1, 4) = "DATE" Then GoTo DontWrite
    If Mid(strLine, 10, 1) = "=" Then GoTo DontWrite
    If Mid(strLine, 73, 10) = " FINANCIAL" Then GoTo DontWrite
    If Mid(strLine, 51, 8) = "00/00/00" Then GoTo DontWrite
    If Mid(strLine, 1, 6) = "AMOUNT" Then GoTo DontWrite
    If Mid(strLine, 1, 12) = "END BALANCES" Then GoTo DontWrite
    Write #1, strLine 'write line to text file

    DontWrite:

    d = c + 1

    Next c

    End If

    Close #1

    b = b + 1

    Next a

    End Sub

    Any ideas will be appreciated

    Thanks

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Importing Large Word File (Access XP)

    Sorry, no idea at all. You wrote that "An ledger was printed to Word". Any chance that whoever did this can output the ledger to a usable format?

  10. #10
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing Large Word File (Access XP)

    Hans I did manage finally. I've increased my RAM to 1 Gig and it allowed me to save the word file as a txt file. Then without any trouble I imported the file. Thanks for your time.

Posting Permissions

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