E
elle0612
Hi
I would like to display a message box to the user on saving a document if a
certain string of words is present in the first column of a table in the
document. I have discovered this code,
Dim rw As Row
Dim celltext As String
Dim tbl As Table
For Each tbl In ActiveDocument.Tables
For Each rw In tbl.Rows
rw.Select
celltext = rw.Cells(1).Range.Words.First.Text
If celltext = "blah di blah" Then
msgBox = " This is a blah di blah document and needs to be Emailed to blah
di blah".
This looks as if its what I need, but how do I incorporate it with the
Save/Save as commands. Or perhaps its not quite what I need - advice please,
Thanks
I would like to display a message box to the user on saving a document if a
certain string of words is present in the first column of a table in the
document. I have discovered this code,
Dim rw As Row
Dim celltext As String
Dim tbl As Table
For Each tbl In ActiveDocument.Tables
For Each rw In tbl.Rows
rw.Select
celltext = rw.Cells(1).Range.Words.First.Text
If celltext = "blah di blah" Then
msgBox = " This is a blah di blah document and needs to be Emailed to blah
di blah".
This looks as if its what I need, but how do I incorporate it with the
Save/Save as commands. Or perhaps its not quite what I need - advice please,
Thanks