Link to home
Start Free TrialLog in
Avatar of octoped
octoped

asked on

RightFax and why doesnt my code work??

I'm experimenting/testing the API Com of some fax software we use at work called RightFax by http://www.captaris.com/ the API tuition supplied by them doesnt seem to work (or i'm doing something very wrong.

The form consists of 2 listboxes, and 1 command button.

the form loads ok and the first listbox1 populates with the users.

I then slelect the required user from the list but when I press the command button I get  runtime error 424 object required.



heres the code......

---------------------------------------


Public gl_MyFaxServer As RFCOMAPILib.FaxServer
Public gl_SelectedUser As String
Dim obj_Fax As RFCOMAPILib.Fax
Dim str_File As String, str_FromName As String
Dim str_UserName As String
Dim str_UserID As String

-----------------------------------------------------


Private Sub btn_ListFaxes_Click()

For Each obj_Fax In MyFaxServer.Faxes(gl_SelectedUser)
str_faxfilename = obj_Fax.FaxFilename
str_FromName = obj_Fax.FromName
lst_FaxList.AddItem str_faxfilename + vbTab + str_FromName
Next

End Sub
-------------------------------------------------------
Private Sub Form_Load()

Set gl_MyFaxServer = New RFCOMAPILib.FaxServer

gl_MyFaxServer.ServerName = "sever1"
gl_MyFaxServer.UseNTAuthentication = False
gl_MyFaxServer.AuthorizationUserID = "aname"
gl_MyFaxServer.AuthorizationUserPassword = ""
gl_MyFaxServer.Protocol = cpNamedPipes

For Each User In gl_MyFaxServer.Users
str_UserID = User.ID
str_UserName = User.UserName
lst_Users.AddItem str_UserID + vbTab + str_UserName
Next


End Sub
----------------------------------------------------------

Private Sub lst_Users_Click()


Dim objUser As RFCOMAPILib.User
Set objUser = gl_MyFaxServer.Users(lst_Users.ListIndex + 1)
gl_SelectedUser = objUser.ID
End Sub
Avatar of EDDYKT
EDDYKT
Flag of Canada image

should it be

gl_MyFaxServer.Users(lst_Users.ListIndex)

instead?
Avatar of octoped
octoped

ASKER

Saddly that didnt work either, same error :(
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of octoped

ASKER

I'm not at work now until thursday so I cant test it now. But if it helps this http://www.brianwhitehouse.co.uk/789605.pdf is the Rightfax tutorial i'm trying to follow. its the first one in the guide. This should give you an idea of what its suposed to do.
Avatar of octoped

ASKER

Thanks, you were spot on, can't believe I overlooked that one.
By the way

it is good to put


Option Explicit

at the beginning on each module and form