- This topic is empty.
-
AuthorPosts
-
September 5, 2001 at 5:00 pm #2691AnonymousMember
Here is an example of using MakeAttachment.
Dim objWinFaxSend As Object
Dim objWinFaxAttach As ObjectSet objWinFaxSend = CreateObject(“WinFax.SDKSend8.0”)
Set objWinFaxAttach = CreateObject(“WinFax.Attachment”)objWinFaxSend.SetClientID (“Client Name”)
Dim objWord As Object
Set objWord = CreateObject(“Word.Application”)
‘ Have Word appear on the screen?
objWord.Application.Visible = True‘ replace this with a valid Microsoft Word document.
objWord.Application.Documents.Open “c:windowsscript.doc”‘ change some settings in Word (not required)
objWord.Application.Selection.WholeStory
objWord.Application.Selection.Font.Name = “Courier New”
objWord.Application.Selection.Font.Size = 8RetCode = objWinFaxSend.SetPrintFromApp(1)
‘ create attachment filename “Filexxx.fxs” and save to root
‘ directory of c: drive.
RetCode = objWinFaxSend.MakeAttachment(“file”, “C:”, 0)‘ Get the original printer settings before altering them.
OldPrinter = objWord.Application.ActivePrinter‘ Set the active printer to WinFax PRO printer driver.
‘ Note: This code only tested in Windows 9x, different printer code may be required
‘ for Windows 2000 and Windows NT.
objWord.Application.ActivePrinter = “WinFax on FaxModem”‘ print the current document in Word to WinFax.
objWord.Application.PrintOut‘ Set Printer back to original settings.
objWord.Application.ActivePrinter = OldPrinter‘Close Active document in Word 2000
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
‘ Close instance of MS Word
objWord.Application.Quit SaveChanges:=wdDoNotSaveChangesSet objWord = Nothing
objWinFaxAttach.SetDescription (“Attachment Example”)
objWinFaxAttach.SetFileName (“c:file001.fxs”)
objWinFaxAttach.AddAttachmentSet objWinFaxSend = Nothing
Set objWinFaxAttach = NothingJanuary 10, 2002 at 6:54 am #4567AnonymousMemberThis is fine for the VB and MS Word, but if i want to print from my program itself then it does’n work.
I am doing the same using VC++ and Using Printer device context to print on WinFax Driver.
If i do both the initialization setting of SDKSend object and Printing on printer driver then it doesn’t work while it work’s if i do these both the task from two different instance of my application.
Please tell me the solution, i am in urgent need.Thax in advance.
Rahul
February 11, 2002 at 10:57 pm #4568malcolmMemberAny news on this? I recently upgraded WinFax to 10.02 to use with XP only to find this issue or something v. similar. My app runs fine with 10.02 on 2000 but same code on XP (using SDK CSDKSend object) ends up hanging after WinFax has accessed Word and printed the doc I want it to send. I noticed a similar issue posted on the Symantec hosted forum.
February 12, 2002 at 6:06 am #4569AnonymousMemberMalcolm,
You probably want to take a look at this thread. The problem looks to be 10.02 specifically with Windows XP. I am not aware of any fix at this timehttp://www.getfaxing.com/cgi-bin/ikonboard/topic.cgi?forum=3&topic=25
March 5, 2002 at 5:22 pm #4570ekinskoferMemberjust a quick question regarding adding attachments. What if the word document is over 1 page? How do we add the attachment in this case? does each addattachment add a new attachment?
cheers,
Eric
March 6, 2002 at 2:33 am #4571AnonymousMemberif its more than one page a file is generated for each page. It appends 001, 002 , 003 etc to each filename. For example, myfax001.fxs, myfax002.fxs …
-
AuthorPosts
- You must be logged in to reply to this topic.