Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
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 |