Macro in a protected Word Template


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> New Users RSS
Next:  Why doesn't Insert key work?  
Author Message
Bullocj1
External


Since: Aug 09, 2007
Posts: 1



PostPosted: Thu Aug 09, 2007 7:52 pm    Post subject: Macro in a protected Word Template
Archived from groups: microsoft>public>word>newusers (more info?)

I'm running Word 98, and am having some difficulties with macros. I'm
building a word template which includes various form fields. I've
added a macro to a check box that will trigger when checked to insert a
page break, and then insert a file, but I'm receiving a run time error
of 4605 because the template is protected. Is there anyway to still
have the macro built this way?

Thanks




--
Bullocj1
Back to top
Doug Robbins - Word MVP
External


Since: Jul 14, 2006
Posts: 2538



PostPosted: Fri Aug 10, 2007 2:16 am    Post subject: Re: Macro in a protected Word Template [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You will have to incorporate commands in your code to unprotect the document
and then reprotect it after the Page Break has been inserted.

I assume that by Word 98 you really mean Word 97 and for that version, make
sure that you add the NoReset flag to the command to protect the document to
prevent the formfields from being reset (data deleted).

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Bullocj1" <Bullocj1.1011a24 RemoveThis @officefrustration.com> wrote in message
news:Bullocj1.1011a24@officefrustration.com...
>
> I'm running Word 98, and am having some difficulties with macros. I'm
> building a word template which includes various form fields. I've
> added a macro to a check box that will trigger when checked to insert a
> page break, and then insert a file, but I'm receiving a run time error
> of 4605 because the template is protected. Is there anyway to still
> have the macro built this way?
>
> Thanks
>
>
>
>
> --
> Bullocj1
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> New Users All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum