Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Macro wont work in protected form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stuck4once - 25 Jul 2007 14:56 GMT
can someone please help me on this:

I have created a form, that needs to be protected to enable to form field
settings to work and so that none of the other text can be deleted.
In this form I have created a click button macro so that when it is pressed
it automatically creates a "Order Number" and saves this document as that
order number.
The problem I am having is that when the document is protected to enable the
form field settings that macro won't work, is there something that I am
missing?

A fast response on this will be greatly appreciate :-)

Many thanks

Arran
Edward Thrashcort - 25 Jul 2007 16:52 GMT
Could you insert the order number as a field which references a document
variable then user the macro to update that variable?

You can temporarily unset and reset the document protection with a macro.
To preserve the current values of the form fields, you may have to make
their current values the defaults before unprotecting the doc.

The best time to unprotect a form is before it holds any user data.

Eddie

> *From:* stuck4once<stuck4once@discussions.microsoft.com>
> *Date:* Wed, 25 Jul 2007 06:56:07 -0700
[quoted text clipped - 14 lines]
>
> Arran
stuck4once - 25 Jul 2007 17:46 GMT
I didn't do that in the end but thanks for your advice,

I ended up making the first part of the macro to unprotect the form then the
last past to re-protect it after it had put in the sequential number and
saved it.

Works perfectly

> Could you insert the order number as a field which references a document
> variable then user the macro to update that variable?
[quoted text clipped - 25 lines]
> >
> > Arran

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.