x404.co.uk
http://www.x404.co.uk/forum/

Pull data out of a table in Word for plain text file
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=1870
Page 1 of 1

Author:  forquare1 [ Mon Jul 20, 2009 12:34 pm ]
Post subject:  Pull data out of a table in Word for plain text file

Hi all,

I need to pull data out of a table in a Word document so I can create a plain text file.

The backstory goes something like this:
We were told to create a new system for electronic filing where a custom form would be filled out. That form was made by someone in my department in Word as a table.
Now we've been told this should be a plain text file, before there was no indication to filetype.

This is easy enough to do, I'm still wading through making these forms electronic (we fill them out by hand currently), so I can just fill in the Word copy for our recoprds and plain text file for the new filing system.
The problem comes when I consider the files I've already made electronic, some 1,300 odd...Each Word document is one page big, with this table in it, and I can't start creating plain text files yet, because we don't know what structure they should take.

So, what do I need to do to create a Macro that will open all these files one by one, extract certain data from the table, then dump it into a new file, saving that as a plain text with the same file name as the Word doc, but with 'txt' on the end?

Any help would be wonderfully appreciated.
Ben

Author:  AlunD [ Mon Jul 20, 2009 12:39 pm ]
Post subject:  Re: Pull data out of a table in Word for plain text file

Christ your employer really and truly knows how to waste time and resources don't they ? :?

Point them at info path http://office.microsoft.com/en-gb/infopath/default.aspx web based forms in a drag and drop environment that you can output the responses in virtually any format you want.

Firstly can you get to the VBA environment in Word? or is it locked down?, something like tools, macro, record / edit from memory.

Author:  forquare1 [ Mon Jul 20, 2009 3:36 pm ]
Post subject:  Re: Pull data out of a table in Word for plain text file

Thanks for your response Alun,

AlunD wrote:
Christ your employer really and truly knows how to waste time and resources don't they ? :?


Yes, it's truely terrible :(

AlunD wrote:
Firstly can you get to the VBA environment in Word? or is it locked down?, something like tools, macro, record / edit from memory.


I can record a Macro in Word, I don't know to what extent, it just types "HELLO WORLD" and makes it center and bold...I preseme some access == all access...

Thanks for the link, I'll suggest it to the department, the bugger of all this is that all of this work might not be of any actual use in a couple of years time, and it's not just the department I'm in, but all the departments in this organisation...

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/