MS Office Forum / Word / Programming / January 2006
Update the second file.
|
|
Thread rating:  |
Steved - 29 Dec 2005 05:29 GMT Hello from Steved
I've got 2 files. 1st File C:\Racebase\Dictionary 2nd File C:\Racebase\Racebase Masked= by Markella, $6,300 is in the file C:\Racebase\Dictionary, I need to replace the word NEW which is on the second line as in the example below please, as in the From To. how can this be acheived. thankyou.
From 4 MASKED 90X24460974 ( 2) 53.5 J TODD 49.9 6 M EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) NEW To 4 MASKED 90X24460974 ( 2) 53.5 J TODD 49.9 6 M EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) by Markella, $6,300
Doug Robbins - Word MVP - 30 Dec 2005 12:06 GMT Tell us a bit more about the contents of both files. For example is "Masked= by Markella, $6,300" a separate paragraph in the Dictionary file?
What esle is in the Racebase file?
From where do you want to do this? and when?
 Signature Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis.
Doug Robbins - Word MVP
> Hello from Steved > [quoted text clipped - 13 lines] > EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) by > Markella, $6,300 Steved - 01 Jan 2006 00:16 GMT Hello Doug from Steved
Tell us a bit more about the contents of both files. For example is "Masked= by Markella, $6,300" a separate paragraph in the Dictionary file? Yes as set out below
Masked= by Markella, $6,300 Ocean Storm= by Justice Prevails, $3,000 Noble Value= by Present Value, $1,775 Wade= by Truly Vain, $2,000 Sharrow Bay= by Kingdom Bay, $6,250 What esle is in the Racebase file?
4 MASKED 90X24460974 ( 2) 53.5 J TODD 49.9 6 M EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) NEW
Exactly the same as above ( 2 Lines Each ) with 300 which is 600 lines. From where do you want to do this? From Dictionary.doc to Racebase.doc
and when? When I open Racebase.doc.
At the moment I do it manually by find in dictionary.doc and replace in Racebase.doc.
Ok Let me explain by using Masked I have both Documents opened I use replace I got to dictionary and find Masked=by Markella, $6,300 I copy by Markella, $6,300 to the replace with in the Dialog Box I put the word in the find what in the Dialog Box
I now goto Racebase.doc and then go find net and replace thye word "NEW"
Hopefully I have explained myself somewhat.
Thankyou
> > Hello from Steved > > [quoted text clipped - 13 lines] > > EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) by > > Markella, $6,300 Doug Robbins - Word MVP - 01 Jan 2006 11:44 GMT Steve,
In the Racebase file, do all of the 300 entries begin with "4 MASKED" and you want to replace the word NEW in all 300 entries with "by Markella, $6,300"?
Or, are some of the entries for "OCEAN STORM", "NOBLE VALUE", "WADE", etc. is there a word "NEW" in those entries that also needs to be replaced with the corresponding data from the Dictionary file?
 Signature Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis.
Doug Robbins - Word MVP
> Hello Doug from Steved > [quoted text clipped - 56 lines] >> > EF HSFHHDGD T( 32 0 5) F(10 0 1) C( 1 0 1) by >> > Markella, $6,300 Steved - 01 Jan 2006 20:16 GMT Hello Doug from Steved
In the Racebase file, do all of the 300 entries begin with "4 MASKED" and you want to replace the word NEW in all 300 entries with "by Markella, $6,300"?
Above question no below question Yes Or, are some of the entries for "OCEAN STORM", "NOBLE VALUE", "WADE", etc. is there a word "NEW" in those entries that also needs to be replaced with the corresponding data from the Dictionary file?
Below is an example from Racebse.doc having the word "NEW" Replaced.
1 MELS BAD BOY will replace the word NEW with BY KINGDOM BAY, $750 7 SIGNIFICANT BID will replace the word NEW with BY MASTERCLASS, $750 8 SPRINGBOK KISS will replace the word NEW with BY MANILA, $125 3 ST FRANCIS will replace the word NEW with BY CAROLINGIAN, $375 5 ADJECTIVE will replace the word NEW with BY LAST TYCOON, $ 6 SHINJU STAR will replace the word NEW with BY CLASSIC FAME, $ 2 WAICOU WASP will replace the word NEW with BY MANNTARI, $ 4 DEL SARTO will replace the word NEW with BY CITIDANCER, $ 10 BALOUSHE will replace the word NEW with BY VAIN, $
The above got the updates from Dictionary.doc as shown below.
Mels Bad Boy= by Kingdom Bay, $750 Waicou Wasp= by Manntari, $ St Francis= by Carolingian, $375 Del Sarto= by Citidancer, $ Adjective= by Last Tycoon, $ Shinju Star= by Classic Fame, $ Significant Bid= by Masterclass, $750 Springbok Kiss= by Manila, $125 Mi Starose= by Centaine, $ Baloushe= by Vain, $
Doug I used the Word "NEW" as to find where I need to do the replacements, meaning using the find and replace dialog box, to goto the second line with the word "NEW", then replace function.
Ok having said all off the above there is only 2 lines that are involved each time the first line you will find 1 MELS BAD BOY at the start of the line the second line you will find by Kingdom Bay, $750 at the end off the line.
1st line will have 1 MELS BAD BOY 2nd line will have by Kingdom Bay, $750
Doug if you need to understand completly copy the bottom
If you can do the replacement without using "NEW" that's fine either way is ok.
Use font 8.5, Courier New, Landscape, paper width 31cm.
1 MELS BAD BOY 4 ( 8) 57.0 L ALLPRESS 49.8 2 C HOWBADDOUWANTIT-CALLA MEL S CRUTCHLEY WANGANUI 44.7 55 270.6 D T( 1 0 0) F( 0 0 0) C( 0 0 0) D( 1 0 0) J( 0 0 0) 1:01.06 2 BY KINGDOM BAY, $750 7 SIGNIFICANT BID 4 ( 2) 55.5 G MCKEON 46.4 2 F OREILLY-SIGNIFICANT G LOWRY HASTINGS 41.9 55 258.7 D T( 1 0 0) F( 0 0 0) C( 0 0 0) D( 1 0 0) J( 0 0 0) 1:00.81 1 BY MASTERCLASS, $750 8 SPRINGBOK KISS 75 ( 6) 55.5 C JOHNSON 52.6 2 F KEEPER-MANILA PHILLY T PERRY FOXTON 7.5 52 92.5 DG T( 2 0 0) F( 1 0 0) C( 0 0 0) D( 2 0 0) J( 0 0 0) 1:02.52 4 BY MANILA, $125 3 ST FRANCIS 5X ( 7) 57.0 R FRASER 40.7 2 C MELLIFONT-FRANKISH G INNES OPAKI 2.0 52 61.7 G T( 1 0 0) F( 1 0 0) C( 0 0 0) D( 1 0 0) J( 0 0 0) 1:01.14 3 BY CAROLINGIAN, $375 5 ADJECTIVE ( 4) 55.0 J PARKES 52.2 2 C TRADITIONALLY-KNAUSS 50 50.0 T( 0 0 0) F( 0 0 0) C( 0 0 0) D( 0 0 0) J( 0 0 0) 0:00.00 5 BY LAST TYCOON, $ 6 SHINJU STAR ( 9) 57.0 D WALKER 46.8 2 G OREILLY-PRIM AND PROPER 50 50.0 T( 0 0 0) F( 0 0 0) C( 0 0 0) D( 0 0 0) J( 0 0 0) 0:00.00 6 BY CLASSIC FAME, $ 2 WAICOU WASP ( 3) 57.0 L CROPP 50.2 2 G BERTOLINI-CATAARI 55 50.0 T( 0 0 0) F( 0 0 0) C( 0 0 0) D( 0 0 0) J( 0 0 0) 0:00.00 7 BY MANNTARI, $ 4 DEL SARTO ( 1) 57.0 A CALDER 53.6 2 C LANGFUHR-BALMORAL BABE G BARLOW AWAPUNI 51 50.0 T( 0 0 0) F( 0 0 0) C( 0 0 0) D( 0 0 0) J( 0 0 0) 0:00.00 8 BY CITIDANCER, $ 10 BALOUSHE ( 5) 55.5 D BRADLEY 53.9 2 F BLACK MINNALOUS-VINCI 3.8 50 50.0 T( 0 0 0) F( 0 0 0) C( 0 0 0) D( 0 0 0) J( 0 0 0) 0:00.00 9 BY VAIN, $
Thankyou.
Doug Robbins - Word MVP - 01 Jan 2006 21:16 GMT Steve,
I suspected that there was more to this than your original posts indicated. I don't have much doubt that the whole process can be automated.
It will be a matter of iterating through the dictionary document to get the item on the left of the equal sign, and then going through the racebase file to located each instance of that string (horse's name?) and replacing the last word in that paragraph, that word being "NEW" with the item on the right of the equal sign.
 Signature Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis.
Doug Robbins - Word MVP
> Hello Doug from Steved > [quoted text clipped - 117 lines] > > Thankyou. Steved - 02 Jan 2006 05:24 GMT Thankyou Doug.
> Steve, > [quoted text clipped - 128 lines] > > > > Thankyou.
|
|
|