I Have the following in my Normal.dtom but nothing happens:
[code]
Sub AutoOpen()
If FileName = "01 - N252" Then
ActiveDocument.CheckSpelling
If FileName = "03 - FrontSheet.doc" Then
ActiveDocument.CheckSpelling
If FileName = "04 - Bill" Then
ActiveDocument.CheckSpelling
If FileName = "08 - Schedules" Then
ActiveDocument.CheckSpelling
If FileName = "09 - Certificates" Then
ActiveDocument.CheckSpelling
If FileName = "10 - Back Sheet" Then
ActiveDocument.CheckSpelling
End If
End If
End If
End If
End If
End If
End Sub
[/code]
Could someone please help me. Also is there a more concise way of strining if statements.
thanking you in advance
Comments
[code]Sub AutoOpen()
If ActiveDocument.Name = "01 - N252.doc" Then
ActiveDocument.CheckSpelling
ElseIf ActiveDocument.Name = "03 - Front Sheet.doc" Then
ActiveDocument.CheckSpelling
ElseIf ActiveDocument.Name = "04 - Bill.doc" Then
ActiveDocument.CheckSpelling
ElseIf ActiveDocument.Name = "08 - Schedules.doc" Then
ActiveDocument.CheckSpelling
ElseIf ActiveDocument.Name = "09 - Certificates.doc" Then
ActiveDocument.CheckSpelling
ElseIf ActiveDocument.Name = "10 - Back Sheet.doc" Then
ActiveDocument.CheckSpelling
End If
End Sub[/code]