Application (WordPerfect; "WordPerfect"; Default!; "DE") filename := "D:\Temp\out.ps" // A filename for the printer output faxnr := "01234567, 0087654321" // The Faxnumber(s) PrinterSelectByName (PrinterName: "OLE-Printer") // Choose a postscript printer PrintDestination (Destination: filename) // Choose print to file Print () // Print Wait (10) // The print call returns sometime before the file is really written. // Make an OLE connection to WHFC Object(whfc;"WHFC.OleSrv") whfc = CreateObject("WHFC.OleSrv") // Send the fax. If the last argument is TRUE the outputfile from the printer // will be deleted after sending the file to the HylaFAX server. whfc.SendFax(filename;faxnr;TRUE) // // Using the two new OLE calls in whfc 1.0.2 // err := 0 FaxNo := "" To := "" Company := "" VoiceNo := "" Location := "" Remarks := "" lpi := 0 PhoneBook := "MyPhonebook" Entry := "Mr. Mueller" FaxNo := whfc.ResolveFaxNo(String(Entry) ; String(PhoneBook) ; &Integer(err)) prompt ("ResolveFaxNo : FaxNo = " + FaxNo + " Function returns " + err) pause() err := whfc.GetInfo(String(Entry) ; String(PhoneBook) ; &String(FaxNo) ; &String(To) ; &String(Company) ; &String(Location) ; &String(VoiceNo) ; &String(Remarks) ; &Integer(lpi) ) prompt ("GetInfo : FaxNo = " + FaxNo + " Function returns " + err) pause()