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

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?
 
G

Guest

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.
 
G

Graham Mayor

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

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top