Sub MAIN 
ch = DDEInitiate("SUPERFAX", "TOPIC") 
FilePrinterSetup "PIC-printer on FAX:" 
DDEExecute ch, "[FAX_SETPARM(FAX_PARMBATCH,1)]" 
Open "c:\superfax\picphone.dir" For Input As #1 
While Not(Eof(1)) 
	DDEExecute ch, "[FOLD_EMPTY()]" 
	MyGetPhone(pnum$, name$) 
	REM 
	REM	Insert receipient name into document 
	REM 
	phonenum$ = Chr$(34) + pnum$ + Chr$(34) 
	FilePrint 
	cmd$ = "[FAX_FOLDER(" + phonenum$ + ")]" 
	DDEExecute ch, cmd$ 
Wend 
Close #1 
DDEExecute ch, "[FAX_SETPARM(FAX_PARMBATCH,0)]" 
DDETerminate ch 
End Sub 
REM 
REM   MyGetPhone(pnum$,name$) is your subroutine to read the next receipient data 
REM		 and fax number 
REM 
Sub MyGetPhone(phone$, name$) 
Read #1, phone$, name$ 
End Sub 
