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_Selec tedUser)
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.UseNTAuthen tication = False
gl_MyFaxServer.Authorizati onUserID = "aname"
gl_MyFaxServer.Authorizati onUserPass word = ""
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_U sers.ListI ndex + 1)
gl_SelectedUser = objUser.ID
End Sub
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_Selec
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.UseNTAuthen
gl_MyFaxServer.Authorizati
gl_MyFaxServer.Authorizati
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_U
gl_SelectedUser = objUser.ID
End Sub
ASKER
Saddly that didnt work either, same error :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
it is good to put
Option Explicit
at the beginning on each module and form
gl_MyFaxServer.Users(lst_U
instead?