Mombu the Microsoft Forum

Go Back   Mombu the Microsoft Forum > Microsoft > Send Fax (modem)
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 9th October 10:06
alessandro ghelfi
External User
 
Posts: 1
Default Send Fax (modem)



I'd like to send a Fax using a free dll under XP (SP3).
But i can't understand if is it possible or not.
Anyone use vbscript to send a Fax?
THank you!
  Reply With Quote


 


2 9th October 10:06
mr_unreliable
External User
 
Posts: 1
Default Send Fax (modem)



hi Allessandro,

There is a (scriptable) com object available for
sending faxes, i.e., faxcom.dll. There are a
number of webpages that discuss how to use it,
you might start here "How To Send a Fax from an
ASP Page on Windows 2000":

http://support.microsoft.com/kb/303647

Here is the code that ms suggests:
--- <code> ---
Function SendFax(FileName As Variant, FaxMachine As Variant, FaxNumber
As Variant)

Set FaxServer = CreateObject("FaxServer.FaxServer")
FaxServer.Connect ("\\" & FaxMachine)
Set FaxDoc = FaxServer.CreateDocument(FileName)
With FaxDoc
.FaxNumber = FaxNumber
.Send
End With


Set FaxDoc = Nothing
Set FaxServer = Nothing End Function
--- </code> ---

Obviously, if converting this to vbs, you leave out
the "as variant" typecasting.

cheers, jw
__________________________________________________ __________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)

p.s. don't show this to Eric Lippert, or you will get blasted
for those "set xx = nothing" statements, which Eric asserts are
totally useless...
  Reply With Quote
3 9th October 10:06
alessandro ghelfi
External User
 
Posts: 1
Default Send Fax (modem)


This script returns an error on command "FaxDoc.Send"
(Cod.Error is 8007000D)

My file.VBS is :

Set FaxServer = CreateObject("FaxServer.FaxServer")
FaxServer.Connect ("")
Set FaxDoc = FaxServer.CreateDocument("c:\TEST.doc")
FaxDoc.FaxNumber = "12345566"
FaxDoc.Send

Can you help me?
I've try to change the filename of FaxDoc, using a simple TXT or a PDF
file, but it return the same error.
Thank you!
  Reply With Quote
4 9th October 10:06
alessandro ghelfi
External User
 
Posts: 1
Default Send Fax (modem)


I understand the error.
The script goes on only if i used a file TIF. ok.
But now it return another error. N. 800706BE.
Why?
  Reply With Quote
5 17th October 17:41
mr_unreliable
External User
 
Posts: 1
Default Send Fax (modem)


fwiw, error code 0x800706BE translates to: RPC_S_CALL_FAILED.

Or in plain English: Remote Procedure Call failed.

cheers, jw
  Reply With Quote
Reply


Thread Tools
Display Modes




666