View Single Post
 
Old 11-23-2013, 10:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something along the lines of:
Code:
Private Sub Document_Open()
With ActiveDocument
  If .SaveFormat = wdFormatRTF Then
    If InStr(.Name, "Contract", vbTextCompare) > 0 Then
      Call FoodAndBeverageMacro(ActiveDocument)
    End If
  End If
End With
End Sub
 
Sub FoodAndBeverageMacro(Doc As Document)
Dim Rslt
Rslt = MsgBox("Do you wish to remove gratuity detail from F&B clause" & vbCr & _
  "(Canadian Properties only)?", vbYesNo, "Canadian F&B Clause Change")
If Rslt = vbYes Then
With Doc.Content.Find
'Find/Replace code goes here
End With
End If
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote