PDA

View Full Version : Solved: ActiveX control / Enable macro prompt AKA STUPID MS WORD



mvidas
11-08-2006, 11:50 AM
Hi everyone,

I haven't done that much in Word, and im stumped as to why something is happening.

I did the following steps (manually):
-Created new document
-Added 3 option buttons to it (did nothing to the properties of them, added no code behind it)
-Protected document with a password
-Save document
-Close word
-Open document

I'm prompted to enable macros.
Why?

fumei
11-08-2006, 12:53 PM
Because of your security setting. Security has to be set to Low to bypass this.

ActiveX controls run code. Even if there is no actual code - the _Click event for the controls has nothing - macro security will still kick in.

The password protection is not relevant to this BTW.

mvidas
11-08-2006, 01:04 PM
Interesting.. can't say that I like that. Why would they ruin Word like that? Excel doesn't act the same way..

So if I want to use radio buttons, without any event code or any code at all in the book, I have to deal with this?

I can save it as an RTF file but the protection stops working (for obvious reasons).

I guess its either protection or no 'enable macros' prompt. Can't have both. Pity.

Thanks Gerry
Matt

fumei
11-09-2006, 01:16 AM
I guess its either protection or no 'enable macros' prompt. Can't have both. Pity. I don't understand. The protection, as stated, is not relevant.

Protected, or not protected...it does not matter. The protection is not the issue. If you have ActiveX controls in the document, and the security setting is not Low, you will get the macro warning.

And yes, t'is true, Excel does not do this. However, Word does.

Out of curiosity, when you say "protect", are you password protecting for opening the file, or password protecting for forms? Not that it makes a difference regrading the use of ActiveX controls....

fumei
11-09-2006, 01:20 AM
And as far "ruining" Word....let me wipe the tears of laughter from my eyes.

Why? WHY?

I have no bloody idea why. Wait until we really have to deal with Office 2007. I truly despise it already. For serious power users, Word 2007 is a effing nightmare.

Ruin it? WHY? Because they can...

mvidas
11-09-2006, 06:16 AM
I don't understand. The protection, as stated, is not relevant.

Protected, or not protected...it does not matter. The protection is not the issue. If you have ActiveX controls in the document, and the security setting is not Low, you will get the macro warning.

And yes, t'is true, Excel does not do this. However, Word does.

Out of curiosity, when you say "protect", are you password protecting for opening the file, or password protecting for forms? Not that it makes a difference regrading the use of ActiveX controls....

This is for a survey being sent to people, and the protection is to prevent people from accidentally editing where they shouldn't.
I only bring up the protection vs activex because I can save the DOC as an RTF file and still get the activex functionality without the macro prompt. However the RTF file isn't protected from being changed (as it is obviously just a text file)



And as far "ruining" Word....let me wipe the tears of laughter from my eyes.

Why? WHY?

I have no bloody idea why. Wait until we really have to deal with Office 2007. I truly despise it already. For serious power users, Word 2007 is a effing nightmare.

Ruin it? WHY? Because they can...
Agreed :)

fumei
11-10-2006, 04:29 PM
I only bring up the protection vs activex because I can save the DOC as an RTF file and still get the activex functionality without the macro prompt. However the RTF file isn't protected from being changed (as it is obviously just a text file)You must have a magic version of Word.

If I have ActiveX controls and I save it as RTF, I get a warning from Word stating that all macros will be lost saving it as RTF. And...indeed it is true. Sure I can save it as RTF, but I do NOT "still get the activex functionality".

What version are you using?

mvidas
11-13-2006, 06:50 AM
You must have a magic version of Word.

If I have ActiveX controls and I save it as RTF, I get a warning from Word stating that all macros will be lost saving it as RTF. And...indeed it is true. Sure I can save it as RTF, but I do NOT "still get the activex functionality".

What version are you using?I've got 2000. When I say 'activex functionality' I dont mean having access to the _click and similar events, but the option buttons still work. I don't need any events, I just need the option button groups to work and the text box/etc without a macro warning.

I'll post two files I just created, one as a .doc file, the other as the same file but as an rtf. When the rtf loads (at least on my pc) it doesnt ask for macros but the controls still work

Thanks for still looking into this :)

Matt

fumei
11-13-2006, 06:13 PM
When I say 'activex functionality' I dont mean having access to the _click and similar events, but the option buttons still work.OK. Yes, in the RTF you can click an option (radio) button. Yes, you can choose one and it will fill in as selected.

However, is this "work"? It does not do anything else. Functionality, IMO, means just that. It functions. It has events. You can use something.

I am still trying to figure out your problem.
This is for a survey being sent to people, and the protection is to prevent people from accidentally editing where they shouldn't.RTF files CAN be protected against editing. Your sample file back to you.

Yes, you can click the option buttons - but can't DO anything with them.

Yes, you can can enter text into the textbox - but can't DO anything with it.

No, you can NOT edit the document.

Why are you using ActiveX anyway????

mvidas
11-14-2006, 06:35 AM
You sound kinda like me when I heard this :) I'm actually doing this for someone (well, was doing it as I think he's done, now I'm just continuing this for the sake of knowledge). He wanted it password protected so it couldn't be edited at all aside from clicking on the buttons and writing short answers in the text boxes, and read that rtf files protection could be removed with a text editor (and I confirmed to him, as they are just text files). He also said that RTF files made with word 2000 aren't protected in 2003? That was news to me but it doesn't really surprise me (could be different rtf keywords), it could be different types of protection but I noticed my protected rtf file had 'revprot' in it, whereas yours has formprot (mine was word 2000, yours is word xp).
The original goal was to have the survey being sent out where users could respond but not change anything so no events or anything would be needed, just a final collection of the answers done by vba on the files in the directory (that part simple enough).


Why use activex anyway?This could be a limit of my word version (and my word knowledge which isn't so great), but I didn't know of an alternative to activex for option buttons and text boxes. excel has the activex and msforms controls available but I couldnt find them in word (though excel doesnt have the macro prompt having only the controls and no events -- strange consistency but not really surprising)
My suggestion was just to use an asp or html page or something to take the survey, would be easy enough to make, however it was shot down :(

fumei
11-14-2006, 07:00 AM
Yes, your RTF was protected for revisions, mine for forms.

OK, if getting the macro warning is SUCH a big deal...just click Enable for crying out loud....and the users are SUCH terrible ones that they just can't wait to get their hands on the document so they can change it grotesquely...they only thing I can think of is to use formfields.

They do not unfortunately have the same grouping function as ActiveX option buttons. But checkboxes could be checked, a textbox could have text entered. Protected for forms = no editing allowed. No macros. No warning.

If it was possible to use a web page for the survey, and it was not done for...whatever reason...hmmmm, my sympathy level just dropped to zero. Not for you I mean, but for "them".

Or...hey...do it in Excel! Sheeesh.

mvidas
11-14-2006, 07:18 AM
Oh yeah he definitely needs no sympathy! Trying to work around the software limitations when there are other options.. well what can you say some people are just like that I guess. Some fun quotes that may amuse you:

I started out using macros and telling them to enable macros before opening the document. Of course I got "what's a macro?" and it went to @#% after that.

just goes to show when you're up against ignorance (ie users/macro enabling) then there's a lot more to learn

To him, having to enable macros, or have his surveyees have to do it is incomprehensible. "So take that out..."

Just because a user doesn't understand or want to use macros, which is his right, doesn't mean he can get what he wants otherwise


In the end, he ended up using an excel version. I probably would have done it all along (or just made a simple survey in VB or the html page), but whatever

Thanks a lot, Gerry, I did learn a bit here
Matt

fumei
11-14-2006, 07:47 AM
Thanks Matt for the morning chuckle. YOU have my sympathy. I know what it is like to have to tell someone:

"It doesn't work that way..." and

"Ummm, let me see if I can explain....."

I had a client who simply refused to believe that everyone would not see her web page exactly the same way, no matter what browser or OS they were using. She was mortally offended when she visited a friend and looked at her site (on an old Mac machine at screen 800 x 600 resolution) and - GASP! - it looked differently than her own machine (PC / IE at 1600 x 1200).

"Fix that!" she said, "they should all look the same, no matter what."

Sigh. My response was..."Lady, you are not paying me enough."

fumei
11-14-2006, 07:53 AM
Bottom line though, I have to agree that it IS rather strange (read: stupid) that Excel has different macro security functionality than Word. Especially when it would not be that hard for Word to take a wee peek and see...well, gosh...there IS no actually code (assuming that there indeed was no code written for the ActiveX events), so what the heck, nothing dangerous here...let 'er rip.

Whatever.