Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want to know if anyone knows a way to pull certain info from microsoft word and putting into an excel template or spreadsheet i have a project due and if anyone knows of a way even to start this off please help. -- joi2 ------------------------------------------------------------------------ joi2's Profile: http://www.excelforum.com/member.php...o&userid=27554 View this thread: http://www.excelforum.com/showthread...hreadid=470764 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have done projects in which I have created, opened, saved, and extracted
text from Word documents, all from within Excel VBA macros. If you set a reference in the VBA Editor (Alt+F11) to the Word library, you will have access to the Word object model. By setting an object to the Word application and Word document being used, you can use the Word properties and methods within an Excel macro to do just about anything. For more specific help, describe your project with a bit more detail. Ed "joi2" wrote in message ... I want to know if anyone knows a way to pull certain info from microsoft word and putting into an excel template or spreadsheet i have a project due and if anyone knows of a way even to start this off please help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am looking for some help with this i have a word file which has all the data i need inputed already what i'm trying to do is write a code that retrieves specific data from the word file like the example below. such as the date in quotes. and inputs the info in to a cell of a template or spreadsheet. (Date Submitted: "9/19/2005" 12:25:10 PM Change Category: Emergency Change Severity: MEDIUM Submitter: doe, john (Network NY) Location: Whitestone NY Submitter Region: NY Metro Impacted Regions: NY Metro Project Leader: doe, john (Network NY) Director: doe, Jane) -- joi2 ------------------------------------------------------------------------ joi2's Profile: http://www.excelforum.com/member.php...o&userid=27554 View this thread: http://www.excelforum.com/showthread...hreadid=470764 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
joi2:
(Date Submitted: "9/19/2005" 12:25:10 PM Change Category: Emergency Change Severity: MEDIUM Submitter: doe, john (Network NY) Location: Whitestone NY Submitter Region: NY Metro Impacted Regions: NY Metro Project Leader: doe, john (Network NY) Director: doe, Jane) How is this data formatted in Word? Is it in a table? Is it in several lines? All on one line? All data for one line entry in one long paragraph? Do you just need the data in quotes? Or do you need each separate item, like: Date Submitted Time Submitted Change Category Change Severity Submitter etc.? "joi2" wrote in message ... I am looking for some help with this i have a word file which has all the data i need inputed already what i'm trying to do is write a code that retrieves specific data from the word file like the example below. such as the date in quotes. and inputs the info in to a cell of a template or spreadsheet. (Date Submitted: "9/19/2005" 12:25:10 PM Change Category: Emergency Change Severity: MEDIUM Submitter: doe, john (Network NY) Location: Whitestone NY Submitter Region: NY Metro Impacted Regions: NY Metro Project Leader: doe, john (Network NY) Director: doe, Jane) -- joi2 ------------------------------------------------------------------------ joi2's Profile: http://www.excelforum.com/member.php...o&userid=27554 View this thread: http://www.excelforum.com/showthread...hreadid=470764 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There are two ways that I've done this - the easy way and the hard way.
The easy way is to create fields in the Word document that you can iterate through to read/write data. Another easy way is to have all the data in a table, and navigate the rows and columns. The hard way is to parse the text. For example you could use Find to locate the label, then step through the characters following the label until you come to a line break, another known label, or a punctuation mark to identity the range of the data to be extracted. ---- Nick Hebb BreezeTree Software http://www.breezetree.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've had to do it the second way, Nick. I had a thousand or more documents
all strung end to end in one long text file, and had to split it all up into separate doc files, reading each one for data points to populate a spreadsheet. A major pain! One space different in your Find label, and all bets were off! It seemed to me the OP was working with something like I had - a file handed to you with the instructions, "Get the data into a spreadsheet." If he has the option of recreating the Word doc, fields or tables are the only way to go! If this is a regular occurrence (a new doc every week), and there are several groups of data such as the example he gave, it might not be a bad idea to create a Word macro to put each data group in a table, and then read the tables to populate the Excel file. Cheers! Ed "Nick Hebb" wrote in message ups.com... There are two ways that I've done this - the easy way and the hard way. The easy way is to create fields in the Word document that you can iterate through to read/write data. Another easy way is to have all the data in a table, and navigate the rows and columns. The hard way is to parse the text. For example you could use Find to locate the label, then step through the characters following the label until you come to a line break, another known label, or a punctuation mark to identity the range of the data to be extracted. ---- Nick Hebb BreezeTree Software http://www.breezetree.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros pulling info from other worksheets | Excel Worksheet Functions | |||
Excel Word copying info from Excel to Word without gridlines / bor | Excel Discussion (Misc queries) | |||
Hi im new to Excel and need info on Macros! | New Users to Excel | |||
Making excel macros run Word macros | Excel Programming | |||
Database info in Word doc | Excel Programming |