Forum Replies Created
-
AuthorPosts
-
April 9, 2002 at 10:17 am in reply to: Convert HTML using asp code – How do I convert an HTML document on the fly? #4564kiwiMember
Hi all.
Ok really simple thing then.. I tried using Winfax with an HTML attachment in VBA from Word (since VBA is virtually identical to VB) but with no success.
Here’s the code, I have hooked up to a button in Word:
Private Sub TestFax_Click()
Set objWinfaxSend = CreateObject(“WinFax.SDKSend”)
objWinfaxSend.SetCoverText “Invoice Attached”
objWinfaxSend.SetSubject “Invoice ” & InvId
objWinfaxSend.SetDeleteAfterSend 1
objWinfaxSend.SetCountryCode “”
objWinfaxSend.SetAreaCode “”
objWinfaxSend.SetNumber “whatever”
objWinfaxSend.SetTo “CusName”
objWinfaxSend.AddAttachmentFile “C:test.html”
objWinfaxSend.AddRecipient
ret = objWinfaxSend.Send(0)
‘ was there an error?
If ret <> 0 Then
MsgBox “There was an Error”, vbOKOnly
Else
MsgBox “Fax has been sent!”, vbInformation
End If
objWinfaxSend.Done
Set objWinfaxSend = NothingEnd Sub
I tried WinFaxSDK.Send and the same with 8.0 on the end to the same effect: Netscape 6.2’s splash screen appears but then WinFax says ‘printing failed you have to launch the app and choose print yourself’…
Anyone had any luck with Netscape 6.2? I have the same problems with Mozilla 0.9.9…
BTW some background: I ultimately don’t want to do this in Word, I will be doing it in Java with the JACOB bridge but I wanted to check that it worked from VB first and then translate it (Jacob is JVM-independent API for supporting Microsoft extensions for java).
April 5, 2002 at 10:15 am in reply to: Convert HTML using asp code – How do I convert an HTML document on the fly? #4562kiwiMemberRe: Internet Explorer always asking for the print dialog to send html, this isn’t necessarily true. Through OLE you can ask Internet Explorer to print without user interaction. Here’s the pseudocode:
IWebBrowser2.ExecWB(IDM_PRINT, OLECMDEXECOPT_DONTPROMPTUSER);
I’m not an OLE guru — is there a way to modify the WinFax method so it uses this nice convenient ‘Dont Prompt User’ option?
kiwiMemberOne question relating to using the printer driver — how do you then specify the phone number to send to progammatically?
What I want to do actually is fax an HTML document programmatically from the server — what’s the best way to do this then?
-
AuthorPosts