Exit design mode again

B

bztips

I know similar questions have been asked a thousand times, but here
goes...

I have a main document to be mail-merged; it has some form fields (drop
down boxes) for the user to enter information. It also has a pushbutton
I created from the Control Toolbox. I save the document as Unprotected
in order to do the mail merge. When the end user opens the document,
there is an Autoopen() macro that turns on Protection.

When a user tries to use this file on another machine, it opens fine.
But he gets the dreaded "Can't exit design mode because Control xxx
cannot be created" when he clicks the pushbutton.

Ideas?

Thx.
/Bill
 
J

Jay Freedman

Yes, the idea is to get rid of the pushbutton. The ActiveX controls from the
Control Toolbox have many problems, ranging from "Control xxx cannot be
created" to just opening in design mode because macros are disabled by the
security mechanism. I can't recommend them for any use. However, you might
read
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnword2k2/html/odc_activeX.asp.

Try using a MacroButton field and a macro instead. MacroButton fields do
work in protected forms -- see
http://www.word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm for an example.
With a little clever formatting, you can even make a MacroButton field look
like a pushbutton.

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

bztips

OK, I tried using a MacroButton

{ MACROBUTTON UpdateTotal Update }

where UpdateTotal is a subroutine defined in Module1 of the document.

Supposedly UpdateTotal should execute when I double-click the button.
But I can't even get to the second click -- after the first click, the
focus is moved to another location in the document. Needless to say,
the subroutine never fires.

/Bill
 
B

bztips

OK, Jay, I found your answer to this question from one of your previous
posts (in 2003!) Thx.
 
J

Jay Freedman

Glad I could help, even retroactively. :) I assume you found the
part about Options.ButtonFieldClicks = 1.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top