How do you get the envelopes option to work in a protected doc?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a protected letter that allows fields to be filled in. However, when
trying to print envelopes, the option is ghosted. What rights need to be
changed to allow printing of envelopes?
 
Thanks for your help. Unfortunately, I am not familiar with VBA coding. I
looked at the code you suggested, but it is all greek to me. I'm sure I could
figure it out in time, but time is not available at this point.
 
Add the following macro to a toolbar button on the form (or run it on exit
from one of the fields)

Sub EnvelopeInForm()
Dim i As Integer
Dim bProtected As Boolean

'Unprotect the file
If ActiveDocument.ProtectionType <> wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect Password:=""
End If

Dialogs(wdDialogToolsEnvelopesAndLabels).Show

'Reprotect the document.
If bProtected = True Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End If
End Sub

See http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top