Here's a way I do that in VB Script using ADSI. It will even prompt you for the domain name in case you have multiple domains to administer.
code:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set AFileStream = FSO.CreateTextFile("c:\pwexp.txt", True)
DomainName = InputBox("Enter the domain name in which the user account exists:", "Enter Domain Name")
Set Domain = GetObject("WinNT://" & DomainName)
Domain.Filter = Array("User")
For Each UserAccount In Domain
AFileStream.WriteLine UserAccount.Name &"'s password will expire on " &UserAccount.PasswordExpirationDate
Next
AfileStream.Close
Set WSHShell = WScript.CreateObject("WScript.Shell")
' Get a reference to the Word Application object.
Set appWord = Wscript.CreateObject("Word.Application")
appWord.Visible = TRUE
appWord.Documents.Open("C:\pwexp.txt")
Edit: Didn't address the emailing issue but this wins half the battle. =D
[ 14. August 2002, 15:33: Message edited by: Tarfin ]