Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Search and replace blank cells with "N/A" within a Word Table
All:
I have done some research, but no luck on my part. I have approximately 100 test scenarios that need to be updated. The scenarios were written in Word and instead of the test writer putting in "N/A" for a blank cell, they, in fact, left it Blank. So, I would like to know if someone could help me where I have a macro that searches the document and places the word "N/A" in place of any empty cell within a table in a document. Thank you. Gene |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Search and replace blank cells with "N/A" within a Word Table
Sub Scratchmacro()
Dim oTbl As Word.Table Dim oCell As Word.Cell For Each oTbl In ActiveDocument.Range.Tables For Each oCell In oTbl.Range.Cells If Len(oCell.Range.Text) = 2 Then oCell.Range.Text = "N/A" End If Next oCell Next oTbl Set oTbl = Nothing Set oCell = Nothing End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. wrote: All: I have done some research, but no luck on my part. I have approximately 100 test scenarios that need to be updated. The scenarios were written in Word and instead of the test writer putting in "N/A" for a blank cell, they, in fact, left it Blank. So, I would like to know if someone could help me where I have a macro that searches the document and places the word "N/A" in place of any empty cell within a table in a document. Thank you. Gene |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
The search "Find Next" with "wildcards" does not function properly | Microsoft Word Help | |||
"find" and "search/replace" modes | Microsoft Word Help | |||
To be able to jump by style (like "Find Next" in "Search") | Microsoft Word Help | |||
disable "first letter of table cells" in "AutoCorrect" with regist | Microsoft Word Help | |||
"Search" function does not work in Word 2002. Any suggestions? | Microsoft Word Help |