Konu: vfp9 dan faks çekme
merhaba arkadaşlar,
vfp9 üzerinden bir excel veya word belgesini faks çekmek istiyorum. winfax veya başka bir programla olabilir. Bir bilgisi olan var mı?
şimdiden teşekkürler
Giriş yapmadınız. Lütfen giriş yapın yada kayıt olun.
fox4um » Microsoft Office Otomasyonu » vfp9 dan faks çekme
merhaba arkadaşlar,
vfp9 üzerinden bir excel veya word belgesini faks çekmek istiyorum. winfax veya başka bir programla olabilir. Bir bilgisi olan var mı?
şimdiden teşekkürler
Faks konusunda bir bilgisi olan yok mu arkadaşlar.
Bir arkadaşım bu konuda çalışan bir çalışması var kendisine ulaşınca yazacağım.
O zamana kadar winfaz dökümanlarına bakmanızı öneirrim.
windows un basit faks ozelligini kullanarakta yapabilirsin,
printer secerken windows faksı secersin sihirbaz seni yonlendirir .
ancak daha profesyonel olmasini gidecek numarayi veritabanindan okutmak istiyorsan winfax vb. cozumler fayalı olacaktır.
Aşağıdaki örnekler arşivimde vardı, hiç kullanma ihtiyacım olmadı çalışıp çalışmadığını bilmiyorum. Belki işine yarar. faxserver ı kullanabilmek için Windows componentlerinden fax services i yüklemen gerekebilir. Alttaki iki örnek winfax ile ilgili.
x=createobject('faxserver.faxserver')
lcNetInfo = SYS(0)
lcMachine ='\\'+alltrim( Left( lcNetInfo, AT('#', lcNetInfo )-1 ) )
x.connect( lcMachine )
fj = x.getjobs()
?fj.count && Prints "0"
fj=.f.
* Show the fax drivers loaded on this machine:
fp = x.getports()
?fp.count
?fp.item(1).name
?fp.item(1).canmodify
?fp.item(1).rings
?fp.item(1).send
?fp.item(1).tsid
?fp.item(1).csid
* Create a fax document
FD = x.createdocument("filename")
fd.faxnumber = '687-9870'
fd.displayname = 'VFP Fax Message'
* Before running this program, create a word document
* called SampleFax.doc... The TAPI interface will automatically
* invoke the registered shell "Print" command on it.
fd.filename = fullpath("samplefax.doc")
fd.sendcoverpage = .f.
* Send it Off!
* (you should see Word open briefly and print the document,
* then the Microsoft Fax icon should show up in the system tray
* and try to send the fax!)
fd.Send
*clean up (probably should wait a bit before this)
inkey(1)
fd = .f.
x = .f.
oWinFax = CreateObject("WinFax.SDKSend")
oWinFax.SetSubject("Test Fax")
oWinFax.SetNumber("1234567")
oWinFax.SetAreaCode("555")
oWinFax.SetCompany("Some Company")
oWinFax.AddRecipient() && Required
oWinFax.SetPrintFromApp(1)
oWinFax.AddAttachmentFile("")
oWinFax.Send(1)
SET PRINTER TO NAME winfax
REPORT FORM MyReport TO PRINT NOCONSOLE
RELEASE oWinFax
** -- Create the WinFax Object here.
oWinFax = CREATEOBJECT("WinFax.SDKSend")
with oWinFax
** -- Set some properties to avoid WinFax to Show on the Screen.
.EnableBillingCodeKeywords(0)
.SetUseCreditCard(0)
.ShowSendScreen(0)
.SetQuickCover(0)
.SetPreviewFax(0)
** -- Set the Cover Page and its text here.
.SetUseCover(1)
.SetCoverFile(TRIM(dFaxTo.cCoverPage))
.SetCoverText(THISFORM.GetCoverText(cFilter))
** -- Make sure WinFax shows it monitor window while sending the Fax.
.ShowCallProgess(1)
** -- Leave the Controller Running after procesing this fax.
.LeaveRunning()
** -- Check that the WinFax Printer is ready.
.IsReadyToPrint()
** -- Setup the Recipient information here.
.SetTo(TRIM(dFaxTo.cFirst) + ' ' + TRIM(dFaxTo.cLast))
.SetSubject(TRIM(dFaxTo.cSubject))
.SetNumber(TRIM(dFaxTo.cLocalNumber))
.SetAreaCode(TRIM(dFaxTo.cArea))
.SetCompany(TRIM(dFaxTo.cCompany))
** -- Finish the WinFax Setup Commands.
.AddRecipient() && Required by WinFax
.SetPrintFromApp(1)
.AddAttachmentFile("")
.SEND(1)
** -- Set the VFP default printer to the WinFax Print Driver.
*SET PRINTER TO NAME "WinFax (Photo Quality)"
SET PRINTER TO NAME "WinFax"
** -- Print the Report here.
REPORT FORM dActivationForm NOEJECT NOCONSOLE TO PRINTER
** -- Make sure this instance of WinFax is done and released.
.done()
endwith
INKEY(1) && Small Delay is needed here prior to Release oWinFax.
RELEASE oWinFax
Ayrıca aşağıdaki linkde winfax için yazılmış, foxfax diye bir örnek çalışma var.
bu bilgiler işimi görür sanırım teşekkür ederim.
Biraz geç cevap oldu ama Haser Adres etiket programının içinde de WinFax üzerinden faks çekme kodlarını bulabilirsin. Programı forumun Download bölümünden indirebilirsin
fox4um » Microsoft Office Otomasyonu » vfp9 dan faks çekme