Function Main() If Save() < 1 SaveAs EndIf fName=GetOpenFileName$() If fName="" Then Exit Function EndIf If Not AppIsRunning("Lotus Notes") Test=Exec ("C:\Notes\_BNotes.EXE","",2 ) If Test<32 Then Message("Unable to start Notes") Exit Function EndIf EndIf Channel = DDEInitiate("Notes", "SendMail") If Channel Then DDEExecute( Channel, "NewMessage") DDEExecute(Channel, STRCAT$("AttachFile ", fName)) DDEExecute( Channel, "SEND") DDETerminate( Channel) Else Message ("Unable to establish link to Notes!") Exit Function EndIf End Function