Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Page layout in a form - Word XP
I have a form that I have protected so that no one can change it. However,
people may need to change the printer tray from which it pulls the paper. Is there a way to do this as Page Setup is disabled in protected forms? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Page layout in a form - Word XP
On Tue, 6 Dec 2005 12:40:02 -0800, "Larry"
wrote: I have a form that I have protected so that no one can change it. However, people may need to change the printer tray from which it pulls the paper. Is there a way to do this as Page Setup is disabled in protected forms? You'll need a macro that unprotects the document, displays the Page Setup dialog, applies only the printer tray assignment, and reprotects the document. See http://www.gmayor.com/installing_macro.htm for how to use the following code: Public Sub PaperTray() ' if the form has a password: 'Dim strPWD As String 'strPWD = "g83Re7ghY9eh" or whatever it is ' unprotect form If ActiveDocument.ProtectionType wdNoProtection Then ActiveDocument.Unprotect ' Password:=strPWD End If Dim dlg As Dialog Set dlg = Dialogs(wdDialogFilePageSetup) With dlg ' display the dialog, but use only the trays If .Display = -1 Then ActiveDocument.PageSetup.FirstPageTray = .FirstPage ActiveDocument.PageSetup.OtherPagesTray = .OtherPages End If End With ' reprotect form ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _ NoReset:=True ', Password:=strPWD End Sub If you have trouble getting the trays to be set correctly by this macro, see the article at http://pubs.logicalexpressions.com/P...cle.asp?ID=101 for a more capable method. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 97 in Windows XP to maintain formatting | Microsoft Word Help | |||
page number printing on a merged report | Mailmerge | |||
how do i set up template in vbeditor without proggramming language | New Users | |||
Envelope Address | New Users | |||
How do I create & merge specific data base & master documents? | New Users |