View Single Post
 
Old 03-24-2023, 01:24 PM
OmarFarouq OmarFarouq is offline Windows 10 Office 2021
Novice
 
Join Date: Mar 2023
Posts: 1
OmarFarouq is on a distinguished road
Default Macro to extract all segments containing a forward slash

Dear Forum Members,

I need a macro to extract all segments that contain a forward slash from a Word document. Extraction better be into a new Excel file, but it can also be into a new Word document, or it can even work if the macro highlights all such segments (each segment is highlighted from start to end).

Here is one example of those segments:

UNEP/POPS/POPRC.16/9/Add.1

Pattern: XYZ/XYZ/XYZ.##/Xyz.#

An here is an example of a paragraph that contains those segments:

At its sixteenth, seventeenth and eighteenth meetings, the Committee, pursuant to paragraphs 6 and 7 (a) of Article 8 of the Convention, adopted the risk profiles and risk management evaluations for methoxychlor (UNEP/POPS/POPRC.16/9/Add.1 and UNEP/POPS/POPRC.17/13/Add.1); Dechlorane Plus (UNEP/POPS/POPRC.17/13/Add.2 and UNEP/POPS/POPRC.18/11/Add.1); and UV-328 (UNEP/POPS/POPRC.17/13/Add.3 and UNEP/POPS/POPRC.18/11/Add.2).

Many thanks in advance.
Reply With Quote