Results 1 to 6 of 6
  1. #1
    bdaniel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    44

    transferring data from a Word document

    Have a subprocedure that uses docmd.transfertext to get data from a text file. Is there a vba command that will accomplish the same thing with a Word document (one that is password protected at that!)?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    A Word document is not data, it is a string of encrypted text and formatting codes. Access and VBA can't read them. I'll go out on a limb and say import of word document is not possible. However, can be an attachment in an Attachment field of a record, although the password protection would be a complication to opening the attached file.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bdaniel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    44
    was hoping could treat similar to a text file.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That's just it, Word .doc files are not 'text' files. Those would be .csv or .txt or .rtf and would have columnar structure that corresponds to fields of Access table.

    There may be a way to link a Word document to Access table that allows typed values in a Word document to feed into table, but never looked into. I know Word document can pull data from Access but pushing is another matter.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    You might be able to VBA macro save the word doc as a text file and then import, but that's just asking for trouble.
    Last edited by Stingaway; 01-04-2012 at 08:59 AM. Reason: I said "VGA" macro instead of "VBA" macro.. DYAC FTW.

  6. #6
    bdaniel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    44

    Smile

    Thanks everyone. I have another idea for what I want to do since this is not going to work. will be posting another thread.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Embed word document into form
    By jgelpi16 in forum Forms
    Replies: 4
    Last Post: 06-26-2012, 11:31 AM
  2. transferring data from word to access
    By RickScolaro in forum Access
    Replies: 6
    Last Post: 09-08-2011, 05:17 PM
  3. Exporting Memo field Data to Word document
    By samlennox in forum Programming
    Replies: 2
    Last Post: 04-25-2011, 11:57 PM
  4. Import Word document using VBA
    By degras in forum Import/Export Data
    Replies: 4
    Last Post: 04-12-2011, 02:40 AM
  5. Replies: 5
    Last Post: 07-16-2010, 10:12 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
  •  
Other Forums: Microsoft Office Forums