Printing envelopes from a protected form

  • Thread starter Thread starter Roxy
  • Start date Start date
R

Roxy

Is there a possibility to have the Envelopes and Labels function "turned back
on" in a password protected user form? The option is grayed out and there is
no way to select or highlight the name, address or city, state and zip to
create your own label.
Is there a macro out there that would do this for me?
Any advice is greatly appreciated!
Thanks in advance ~ Roxy
 
You would need a macro to unlock the form print the envelope then relock it
eg the following macro run from a field or toolbar button will do that:

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

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

End If

Dialogs(wdDialogToolsCreateEnvelope).Show

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

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

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

My web site www.gmayor.com

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


Roxy wrote:> Is there a possibility to have the Envelopes and Labels
function
 
This works great, and I followed your instructions on how to add the macro to
my tool bar. But I have a question. This form is going to be distributed by
email to multiple users; will the macro button stay attached with the form
when it gets sent out to users? Or must I do something different so that all
other users will have this function when the form is emailed out?

Thanks again!
 
Would it make any differance if I assigned the macro to a hot key? Then when
the protected form is emailed out to all the users just tell them what the
hot key is and nothing would have to be installed on their machines?
BTW I am using Word 2003.

Thanks again!
 
In response to this and your previous question, the macro will by default
have been saved in normal.dot on your PC, so remote users will not be able
to run it as it stands. You could save the macro in the document, but then
wary users are likely to prevent access to the macros for security reasons.
The best plan would be to move the macro and toolbar to the document either
by copy/paste in the vba editor http://www.gmayor.com/installing_macro.htm
or by using the Organizer (ALT+F8) > Organizer then save the document as a
template (*.dot). Instruct the users to install the template and create
documents from it. See also
http://word.mvps.org/faqs/macrosvba/distributemacroscontent.htm

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

My web site www.gmayor.com

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