mark
Thu Dec 15 14:26:03 CST 2005
Jean-Guy,
Fantastic, thank you
--
Mark
"Jean-Guy Marcil" wrote:
> Mark was telling us:
> Mark nous racontait que :
>
> > I was thinking on the lines of:
> >
> > ActiveDocument.formfields("type").Result = "This is for Peter"
> >
> > ActiveDocument.formfields("type").Result = "This is for John"
>
> 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
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site:
http://www.word.mvps.org
>
>
>