REM Description: Send current document as email attachment
REM Filename: mailmapi.wmc
REM Created by: Rich Zuris - 11/24/93
REM This macro supports the MAPI email standard (Microsoft) only
'Windows APIs
DECLARE FUNCTION GetTempFileName LIB "kernel" (bDriveLetter AS WORD, lpszPrefixString AS STRING, uUnique AS WORD, lpszTempFileName AS STRING) As Word
DECLARE FUNCTION MAPISendDocuments LIB "mapi.dll" (hwnd AS INTEGER, lpDelim AS STRING, lpPaths AS STRING, lpNames AS STRING, res AS INTEGER) AS Integer
'Can't run if no document open
IF GetDocName$() = "" THEN
MESSAGE "Please create a new document or open an existing document first."
STOP
ENDIF
'Get temporary file name and save copy of document
'Hope there's enough disk space on temp drive, etc.