Hi Graham,
your idea was the right one.
I had in the UserForm_initialize this code: Set oDoc = ActiveDocument.
Now I have changed the programm into:
Delete this line of code but insert
Private Sub UserForm_Activate()
If oDoc Is Nothing Then Set oDoc = ActiveDocument
End Sub
Now all is working! Thank you and have a nice Christmas!
Dietrich (from Salzburg)
|