• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1631
  • Last Modified:

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
0
octoped
Asked:
octoped
  • 3
  • 3
1 Solution
 
EDDYKTCommented:
should it be

gl_MyFaxServer.Users(lst_Users.ListIndex)

instead?
0
 
octopedAuthor Commented:
Saddly that didnt work either, same error :(
0
 
EDDYKTCommented:
should it be

For Each obj_Fax In gl_MyFaxServer.Faxes(gl_SelectedUser)

instead of

For Each obj_Fax In MyFaxServer.Faxes(gl_SelectedUser)


wher do you defined MyFaxServer
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
octopedAuthor Commented:
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.
0
 
octopedAuthor Commented:
Thanks, you were spot on, can't believe I overlooked that one.
0
 
EDDYKTCommented:
By the way

it is good to put


Option Explicit

at the beginning on each module and form
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now