Hi René,
I wonder, whether this will help, but anyway,
what I've found out is, that
after input of 1 character that isn't a digit,
.numcopies will return the preset value.
So if you preset .numcopies by 1,
after an input of a, [ok], 2,
.numcopies will still return 1.
Which means, that, if a user types "a",
corrects it to "2", 1 copy will be printed.
Otherwise, you may preset .numcopies by "".
Which means, that a user will have to enter 1,
though she/he has no other choice.
Auch nicht das Gelbe vom Ei!!!
(Not the intention of the inventor).
One should translate Your site into English!
Non German speakers miss a lot!
At least, the error message can be avoided.
The code is only a scribble.
Sub Test()
Dim r As Variant
Dim n As Variant
With Dialogs(wdDialogFilePrint)
start:
.numcopies = "1"
On Error Resume Next
r = .Display
n = .numcopies
If n = "" Then
MsgBox "try again"
GoTo start
End If
If n > 1 Then
MsgBox "You can print only 1 copy."
GoTo start
End If
End With
End Sub
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
>Hi:
>
[quoted text clipped - 33 lines]
> End With
>End Sub