N
Nickolai Medveditskov
I am trying to insert my control into Word 2003 and the results depend on
Word macro's security setting.
Code is following:
....
MSWORD::InlineShapesPtr shapes;
....
HRESULT hr = shapes->AddOLEControl(&controlType, &vEmpty, &shape);
....
1. Word security (Tools/Macro/Security) is set to 'Very High' - this code
inserts the control without problem.
2. 'High' - the same.
3. 'Medium' - not tested because it displays "Enable/Disable Macros" dialog;
2. 'Low' - the code shoes message box - "Microsoft Visual Basic", "Can't
exit design mode because Control 'MyTextBox3' can not be created".
What is unreasonable here, that higher security level works fine in place
where lower security does not work.
Why it is implemented in such way and how to workaround it?
Nickolai.
Word macro's security setting.
Code is following:
....
MSWORD::InlineShapesPtr shapes;
....
HRESULT hr = shapes->AddOLEControl(&controlType, &vEmpty, &shape);
....
1. Word security (Tools/Macro/Security) is set to 'Very High' - this code
inserts the control without problem.
2. 'High' - the same.
3. 'Medium' - not tested because it displays "Enable/Disable Macros" dialog;
2. 'Low' - the code shoes message box - "Microsoft Visual Basic", "Can't
exit design mode because Control 'MyTextBox3' can not be created".
What is unreasonable here, that higher security level works fine in place
where lower security does not work.
Why it is implemented in such way and how to workaround it?
Nickolai.