Is it possible to create an envelope while using a protected docum

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

Guest

I have a protected letter in Word 2007 (docx). When I select the Mailing tab
in the ribbon, the Envelope button is not available. Is it possible to allow
access to create an envelope when in a protected word document/
 
JLW1 said:
I have a protected letter in Word 2007 (docx). When I select the
Mailing tab in the ribbon, the Envelope button is not available. Is
it possible to allow access to create an envelope when in a protected
word document/

You'd need a macro that unprotects the document, inserts the envelope, and
reprotects the document. You can put a button on the Quick Access Toolbar to
run the macro.

Here's a fairly minimal macro to do the job. I tested it in Word 2003; I
don't have 2007 here, but it should work the same.

Sub ProtectedEnvelope()
Dim dlg As Dialog

With ActiveDocument
If .ProtectionType <> wdNoProtection Then
.Unprotect
End If

Set dlg = Dialogs(wdDialogToolsEnvelopesAndLabels)
dlg.DefaultTab = wdDialogToolsEnvelopesAndLabelsTabEnvelopes
dlg.Show

.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End With
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Shoot, that's what I feared. Thanks Jay!

Jay Freedman said:
You'd need a macro that unprotects the document, inserts the envelope, and
reprotects the document. You can put a button on the Quick Access Toolbar to
run the macro.

Here's a fairly minimal macro to do the job. I tested it in Word 2003; I
don't have 2007 here, but it should work the same.

Sub ProtectedEnvelope()
Dim dlg As Dialog

With ActiveDocument
If .ProtectionType <> wdNoProtection Then
.Unprotect
End If

Set dlg = Dialogs(wdDialogToolsEnvelopesAndLabels)
dlg.DefaultTab = wdDialogToolsEnvelopesAndLabelsTabEnvelopes
dlg.Show

.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End With
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Back
Top