Hi all,
After exhaustive searching for info on this topic, it appears the preferred approach is using early binding to create a new fax message to send.
The Problem:
A new message is created ready for cover page info to be entered, but attempting to add an attachment (which my users will want to do sometimes) causes winfax to lock up, seemingly waiting for the code to finish. Otherwise this code works well without trying to add an attachment after WinFax has started:
Any ideas would be appreciated.
After exhaustive searching for info on this topic, it appears the preferred approach is using early binding to create a new fax message to send.
The Problem:
A new message is created ready for cover page info to be entered, but attempting to add an attachment (which my users will want to do sometimes) causes winfax to lock up, seemingly waiting for the code to finish. Otherwise this code works well without trying to add an attachment after WinFax has started:
Code:
Public Function SendFax(strName As String, strNumber As String, strCompany As String, Optional strSubject As String)
Dim objWFXSend As wfxctl32.CSDKSend
Set objWFXSend = New wfxctl32.CSDKSend
With objWFXSend
.SetTo (strName)
.SetNumber (strNumber)
.SetCompany (strCompany)
.AddRecipient
.ShowSendScreen 1 'Needed to preview fax before send.
.SetSubject (strSubject)
.SetUseCover 0 '0=default coverpage set in WinFax
.Send (0)
.Done
End With
Set objWFXSend = Nothing
End Function
Any ideas would be appreciated.