Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting info from word using macros


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   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Getting info from word using macros

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting info from word using macros


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   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Getting info from word using macros

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Getting info from word using macros

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   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Getting info from word using macros

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros pulling info from other worksheets [email protected] Excel Worksheet Functions 3 December 7th 07 10:01 AM
Excel Word copying info from Excel to Word without gridlines / bor Renee Thomas Excel Discussion (Misc queries) 2 September 13th 07 09:24 AM
Hi im new to Excel and need info on Macros! SarahKay New Users to Excel 1 June 15th 05 02:43 PM
Making excel macros run Word macros Matthew McManus Excel Programming 1 February 18th 04 02:57 AM
Database info in Word doc Debra Dalgleish[_2_] Excel Programming 0 September 3rd 03 09:20 PM


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"