Checking if the active file is a schematic document.
Sub IsthisaSCHFile
Set CurrentFile = SchServer.GetCurrentSchDocument
If CurrentFile is Nothing Then
ShowMessage ("This is not a SCH file!")
Else
ShowMessage ("This is a SCH file!")
End If
End Sub
http://www.tdpcb.com/