In a doc the fieldcode 'Fillin' is used.

When using this document in a vb script (in this case printing) a window wil
open and show the contens of the Fillin code.

I like to disable the filin code during printing;

========================================================
FileName="D:\KLANTEN\Stork\TESTENV\vb\jim.doc"
PrinterName = "STORKH08815"

Dim WordObj
' On Error Resume Next
Set WordObj = CreateObject("Word.Application")
' This doenst work :-) WordObj.Wdfieldtype.wdfieldfillin = False

WordObj.Documents.Open FileName
WordObj.ActivePrinter = PrinterName
WordObj.PrintOut
WordObj.Quit

===============================

Thnx

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200512/1

Re: Disable Fieldcode 'Fillin' by Jean-Guy

Jean-Guy
Tue Dec 13 13:08:56 CST 2005

Jim via OfficeKB.com was telling us:
Jim via OfficeKB.com nous racontait que :

> In a doc the fieldcode 'Fillin' is used.
>
> When using this document in a vb script (in this case printing) a
> window wil open and show the contens of the Fillin code.
>
> I like to disable the filin code during printing;
>
> ========================================================
> FileName="D:\KLANTEN\Stork\TESTENV\vb\jim.doc"
> PrinterName = "STORKH08815"
>
> Dim WordObj
> ' On Error Resume Next
> Set WordObj = CreateObject("Word.Application")
> ' This doenst work :-) WordObj.Wdfieldtype.wdfieldfillin = False
>
> WordObj.Documents.Open FileName
> WordObj.ActivePrinter = PrinterName
> WordObj.PrintOut
> WordObj.Quit
>
> ===============================
>
Try something like this:

Const FileName As String = "D:\KLANTEN\Stork\TESTENV\vb\jim.doc"
Const PrinterName As String = "STORKH08815"
Dim WordObj As Word.Application
Dim UserFieldUpdateStatus As Boolean

Set WordObj = CreateObject("Word.Application")

With WordObj
.Documents.Open FileName
UserFieldUpdateStatus = .Options.UpdateFieldsAtPrint
.ActivePrinter = PrinterName
.PrintOut
.Options.UpdateFieldsAtPrint = UserFieldUpdateStatus
.Quit
End With



--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org