Does anybody know if sending an email with Word can be automated?
I have a form in Word that I would like to send automated, using the EnvelelopeVisible property.
I would like to:
  • add a recipient addres
  • add a subject
  • send the email

;Script Options
If Not @LOGONMODE
    Break On
Else
    Break Off
EndIf
Dim $RC
$RC = SetOption("Explicit", "On")
$RC = SetOption("NoMacrosInStrings", "On")
$RC = SetOption("NoVarsInStrings", "On")
If @SCRIPTEXE = "KIX32.EXE"
    $RC = SetOption("WrapAtEOL", "On")
EndIf

;Declare variables
Dim
$objWord

Dim $strFile

;Initialize variables
$objWord = CreateObject("Word.Application")
$strFile = "C:\Test\WordTemplate.dot"

;Code
$objWord.Visible = True
$RC = $objWord.documents.open($strFile)
$objWord.activewindow.EnvelopeVisible = True