I'm hoping someone can help me with creating a macro to help me do something in Word 2003. I have many *.rtf files that need to be altered. I would like a macro that can search for a specific phrase and delete everything before that phrase in the document. Also, if possible save the altered file as *.doc rather than *.rtf.
I know this is an excel board, but everyone here was so helpful in the past in creating macros for me to use in excel I thought I'd ask on here.
Here is an example what needs to be done for each and every *.rtf file I have:
I would want the macro to search and find "Registry Number: " and delete everything before that in the document. So, in the example above the new document would read:
I know this is an excel board, but everyone here was so helpful in the past in creating macros for me to use in excel I thought I'd ask on here.
Here is an example what needs to be done for each and every *.rtf file I have:
Code:
Explore by Substance Identifier started at: Fri Nov 26, 2004 at 4:51 PM
Explored by Substance Identifier in REGISTRY.
REGISTRY Answers
0 for 2,6-diamino-5-hydroxyhexanoic acid
21 for -5-hydroxyhexanoic acid
Get References started
127 references were found for 16 of 21 substances in CAPLUS and MEDLINE; for each sequence, retrieve additional related references
Research Topic Refine started
31 references were found when refined using the phrase "HUMAN"
Research Topic Refine started
31 references were found when refined using the phrase "URINE OR PLASMA"
Research Topic Refine started
17 references were found when refined using the phrase "HEALTHY OR DISORDER"
Copyrights:
CAPLUS: Copyright 2004 ACS (The UK patent material in this product/service is UK Crown copyright and is made available with permission. (C) Crown Copyright. The French (FR) patent material in this product/service is made available from Institut National de la Propriete Industrielle (INPI).)
MEDLINE: Produced by the U.S. National Library of Medicine
REGISTRY: Copyright 2004 ACS (Some records contain information from GenBank(R). See also: Benson D.A., Karsch-Mizrachi I., Lipman D.J., Ostell J., Rapp B.A., Wheeler D.L. Genbank. Nucl. Acids Res. 28(1):15-18 (2000). Property values tagged with IC are from the ZIC/VINITI data file provided by InfoChem.)
CASREACT: Copyright 2004 ACS (In addition to reactions indexed by CAS, CASREACT contains reactions derived from the following sources: ZIC/VINITI database (1974-1991) provided by InfoChem, INPI data prior to 1986, and Biotransformations database compiled under the direction of Professor Dr. Klaus Kieslich.)
CHEMLIST, CHEMCATS: Copyright 2004 ACS
Registry Number: 83972-61-6
Absolute stereochemistry.
Formula: C6 H12 O3
CA Index Name: Hexanoic acid, 5-hydroxy-, (5R)- (9CI)
Other Names: Hexanoic acid, 5-hydroxy-, (R)-; (5R)-5-Hydroxyhexanoic acid
I would want the macro to search and find "Registry Number: " and delete everything before that in the document. So, in the example above the new document would read:
Code:
Registry Number: 83972-61-6
Absolute stereochemistry.
Formula: C6 H12 O3
CA Index Name: Hexanoic acid, 5-hydroxy-, (5R)- (9CI)
Other Names: Hexanoic acid, 5-hydroxy-, (R)-; (5R)-5-Hydroxyhexanoic acid