1 diff --git vbahelper/source/vbahelper/vbadocumentsbase.cxx vbahelper/source/vbahelper/vbadocumentsbase.cxx
2 index 813e084..6d5ddb3 100644
3 --- vbahelper/source/vbahelper/vbadocumentsbase.cxx
4 +++ vbahelper/source/vbahelper/vbadocumentsbase.cxx
6 #include <com/sun/star/util/XCloseable.hpp>
7 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
8 #include <com/sun/star/document/XTypeDetection.hpp>
9 +#include <com/sun/star/document/MacroExecMode.hpp>
10 #include <com/sun/star/uri/XUriReference.hpp>
11 #include <com/sun/star/uri/XUriReferenceFactory.hpp>
12 #include <com/sun/star/lang/XServiceInfo.hpp>
13 @@ -271,8 +272,13 @@ VbaDocumentsBase::Open( const rtl::OUString& rFileName, const uno::Any& ReadOnly
14 ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"),
16 uno::UNO_QUERY_THROW );
18 uno::Sequence< beans::PropertyValue > sProps( rProps );
19 - sal_Int32 nIndex = 0;
20 + sProps.realloc( sProps.getLength() + 1 );
21 + sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode") );
22 + sProps[ sProps.getLength() - 1 ].Value <<= uno::makeAny( document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN );
24 + sal_Int32 nIndex = sProps.getLength() - 1;
26 if ( ReadOnly.hasValue() )