![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Dears,
I have a Word Document with approximately 1000 tables. Each table may have 1, 2, 3, 4, 5, or even six columns. I want to create a VBA code that goes through all my Word tables, checking on every cell if there is a specific text ("HELLO") in this sample. So, on the last page of my Word Document, the macro should create a new table with 4 columns and insert the following information: Column 1: The Check explained below (1) Column 2: The entire text of the left side cell. Column 3: The page header where the text "HELLO" was found Column 4: The page number where the text "HELLO" was found (1) The check: Whenever the text "HELLO" is found, the macro should check the content of the left side cell. If the left side cell's text contains the word "APPLE" the code should populate column 1 with the text "I LIKE APPLES". If the left side cell's text contains the word "BANANA", then the code should populate column 1 with the text "I DON'T LIKE BANANA" End, if possible, the text on the Column 2 must be a hyperlink that, if clicked, directs the user to the page where this text came from. Please, find a sample file attached here! How can I do that? Any help is very welcome! Thanks a lot |
Tags |
cells, copy, table |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
SeanCGR | Word | 1 | 06-20-2014 06:49 AM |
How to edit the "Format" and the "show level" of an EXISTING table of content? | Jamal NUMAN | Word | 2 | 08-14-2011 10:46 AM |
![]() |
Jamal NUMAN | Word | 4 | 07-08-2011 04:12 AM |
![]() |
Jamal NUMAN | Word Tables | 2 | 06-30-2011 04:47 PM |
How to have colons (:) in the "Table of content" but to be hidden in the "Heading"? | Jamal NUMAN | Word | 0 | 06-26-2011 04:53 PM |