Mark was telling us:
Mark nous racontait que :
Try this:
'_______________________________________
Option Explicit
'_______________________________________
Sub PrintCopies()
Dim MyBackgroudOptions As Boolean
Dim GetText As String
Dim GetNumber As String
Dim i As Long
MyBackgroudOptions = Options.PrintBackground
Options.PrintBackground = False
Do
GetNumber = InputBox("How many copies do you need.", _
"Print Out Count")
Loop While Not IsNumeric(GetNumber) And Not GetNumber = ""
If GetNumber = "" Then GoTo LeaveSub
For i = 1 To CLng(GetNumber)
GetText = InputBox("Type the text to use for copy number " _
& i & ".", "Print Copies")
If Not GetText = "" Then
Myprintout GetText
End If
Next
LeaveSub:
Options.PrintBackground = MyBackgroudOptions
End Sub
'_______________________________________
'_______________________________________
Function Myprintout(FieldText As String) As Boolean
With ActiveDocument
.FormFields("type").Result = FieldText
.PrintOut
End With
End Function
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org