I am trying to use the RightFax API file inside of a VBscript. I found a site that mentioned the code below. Everytime I try to run it I end up getting a Line 1 Char 1 Error: Active X component can't create object: RFCOMAPI.FAXSERVER Code: 800A01AD.
I am not sure why. This .DLL file is registered and it is on the actual rightfax server. Maybe I am not doing the code right, or it is for a different method. Here is the site:
Note: I am using RightFax 10.
I am not sure why. This .DLL file is registered and it is on the actual rightfax server. Maybe I am not doing the code right, or it is for a different method. Here is the site:
Note: I am using RightFax 10.
Code:
Set f = CreateObject("RFCOMAPI.FaxServer")
f.Protocol = 4
wscript.echo f.users.count
Set f = CreateObject("RFCOMAPI.FaxServer")
f.servername = "RightFaxServer"
f.UseNTAuthentication = True
f.AuthorizationUserID = "Domain\User"
f.AuthorizationUserPassword = "Pass"
wscript.echo f.serverinfo.IsEnterprise
Set oNewFax = f.CreateObject(5)
oNewFax.ToFaxNumber = "5558434042"
oNewFax.ToName = "Kelvin Wong"
oNewFax.HasCoversheet = True
oNewFax.Attachments.Add "c:\scripts\1.pdf"
oNewFax.Send