LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Getting info from word using macros

If you've got many Word files and only one Excel file, you might be better
off recording macros in Word that reference the single Excel file, rather
than trying to create a program that references all the separate Word files.
Read all the below, think through it in your mind first, and maybe even try
it a few times without recording it.

In the Word VBE, you'd set a reference to the Excel library, then set
objects to your Excel application and Excel master file in your macro. Pull
up a Word doc. Highlight *Platform*: and copy, the CTRL+Home. Select
Record New Macro, CTRL+F, paste, Enter. This should take you to *Platform*:
.. Hit the Right Arrow.

Now is the tricky part. Is the portion you want for a data point always the
same length, or at least filling the same number of spaces? Or can you
CTRL+Shift+End to get to the end of the line with all of AND ONLY your data
point selected?

I'm suggesting this method because what I see in your response is a
text-based document, rather than a table-based doc. If you have Word docs
that are all formatted different from each other, writing one macro to fit
all of them is very difficult. If you have a few different formats, you can
get by with a few different macros.

Again, the key is consistency. You have to be able to go to the same point
in the document every time. A macro is not smart enough to recognize that
for this week or this doc, it must find two spaces instead of one because
someone stuttered on the space bar. If you can exercise any control over
the consistency, things will go much better.

If you do have tables, and these tables are in the same order every time,
with the same data points in the same cells of the same table every time,
it's much easier.

Ed

"joi2" wrote in message
...

alright this is pretty much what I have to do I have a project due
every week i need to sort out a bunch of tables that people send me.
They pretty much have the same info in each table. but each table is
broken apart and they are inconsistent. first I'm trying to find a
macro to link the word file to excel. And second I want to find a way
to copy the data from a cell in word and pasting it in a cell in excel.
can someone send me a sample code or something to start off with here is
what it looks like
--------------------------------------------------------------------------

-------------------
*Data Change Type/Application/Platform *
--------------------------------------------------------------------------

-------------------
*Type*: Power work, *Platform*: Power System (Data Center),
*Application*:
--------------------------------------------------------------------------

-------------------
*Software/Hardware Status*:
--------------------------------------------------------------------------

-------------------
*Impacts IT*: No
--------------------------------------------------------------------------

-------------------
for example I want to copy the info after the : which is after
platform. and paste it in a cell.


--
joi2
------------------------------------------------------------------------
joi2's Profile:

http://www.excelforum.com/member.php...o&userid=27554
View this thread: http://www.excelforum.com/showthread...hreadid=470764





 
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 07:46 AM.

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"