Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re:



Hendri Verveda wrote:
> 
> Hello,
> 
> Hylafax reports the following problem:
> 
> ---
> Your facsimile job to 370241 was not sent because document conversion
> to facsimile failed.  The output from the converter program was:
> 
> Could not reopen converted document to verify format
> ---
> 
> I read about this problem in the faq section (q146) but I couldn't find a
> solution.
> 
> I'm using WHFC and installed an Apple Laserwriter connected to the WHFC
> port. When I use the normal method (printing to this printer) it all works
> fine, but not when I use a word macro (VBA and OLE as described in
> http://transcom.de/whfc/doku/ole.html), although I use the same printer!
> The only difference is that it doesn't send it to the whfc-port directly,
> but writes to a ps file, which is send to the whfc-port later, using the
> SendFax(FileName, FaxNo, RmFile) ole-command.
> 
> Can you help with this?
> 
> My configuration:
> --
> HylaFax: hylafax-v4.0pl2
> compiler: gcc version 2.7.2.1
> system: linux 2.0.3x end HPUX 10.20
> Ghostscript version 5.1
> --
> 
> Best regards,
> 
> -
> NIDO UNIVERSAL MACHINES B.V.
> 
> Hendri Verveda
> h.verveda@nido.nl

There is a definite need to name your printer the same as in the macro
(or edit the macro)

I use the name HylaFAX now.


I have enclosed a more recent macro.


Keith
Attribute VB_Name = "FaxMerge"

Sub SendThisFax()
'
' SendThisFax Macro
' Macro created 08/11/98 by Keith Gray
' Macro modified 08/06/99 by Chua Choon Hian
'   To restore the original default printer
'   Change fixed path to temp directory by using environment variables
' Macro modified 01/07/99 by Keith Gray
'   for multi-page documents

Dim whfc As Object
Dim OLE_Return As Long
Dim faxnum As String
Dim SpoolFile As String
Dim Title As String
Dim WhfcPrinter As String
Dim Default_Active_Printer As String
Dim Box_Return As Integer

SpoolFile = Environ("Temp") & "\fax.ps"
Title = "Whfc Macro ( Version 1.03 )"

faxnum = ActiveDocument.MailMerge.DataSource.DataFields("FaxNumber")

WhfcPrinter = "HylaFAX"
Default_Active_Printer = ActivePrinter
ActivePrinter = WhfcPrinter$

Application.PrintOut FileName:="", Range:=wdPrintAllDocument, _
    Item:=wdPrintDocumentContent, Copies:=1, Pages:="", _
    PageType:=wdPrintAllPages, Collate:=True, Background:=True, _
    PrintToFile:=True, OutputFileName:=SpoolFile, Append:=False

  Set whfc = CreateObject("WHFC.OleSrv")
  OLE_Return = whfc.SendFax(SpoolFile, faxnum, True)
  If OLE_Return <= 0 Then
    Box_Return = MsgBox("Error sending file", 16, Titel)
  Else
    Box_Return = MsgBox(OLE_Return, 0, Title)
  End If
  Set whfc = Nothing

ActivePrinter = Default_Active_Printer$
End Sub
Sub MergeFax()
'
' MergeFax Macro
' Macro created 08/11/98 by Keith Gray
'

Dim whfc As Object
Dim OLE_Return As Long
Dim faxnum As String
Dim SpoolFile As String
Dim Title As String
Dim WhfcPrinter As String
Dim Default_Active_Printer As String
Dim Box_Return As Integer

ActiveDocument.MailMerge.ViewMailMergeFieldCodes = True
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdLastRecord
Numb_Faxes = ActiveDocument.MailMerge.DataSource.ActiveRecord
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdFirstRecord
For I = 1 To Numb_Faxes
SpoolFile = Environ("Temp") & "\fax" & I & ".ps"
Title = "WHFC Mail Merge to Fax Macro( Version 1.03 )"

faxnum = ActiveDocument.MailMerge.DataSource.DataFields("FaxNumber")

WhfcPrinter = "HylaFAX"
Default_Active_Printer = ActivePrinter
ActivePrinter = WhfcPrinter$

Application.PrintOut FileName:="", Range:=wdPrintAllDocument, _
    Item:=wdPrintDocumentContent, Copies:=1, Pages:="", _
    PageType:=wdPrintAllPages, Collate:=True, Background:=True, _
    PrintToFile:=True, OutputFileName:=SpoolFile, Append:=False

  Set whfc = CreateObject("WHFC.OleSrv")
  OLE_Return = whfc.SendFax(SpoolFile, faxnum, True)
  If OLE_Return <= 0 Then
    Box_Return = MsgBox("Error sending file", 16, Titel)
  Else
    'Box_Return = MsgBox(OLE_Return, 0, Title)
  End If
  Set whfc = Nothing
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdNextRecord
Next I

ActivePrinter = Default_Active_Printer$
End Sub


Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services