из программных комплексов сделан экспорт/импорт документов, только зачастую нужно чтобы уровень безопасности макросов в офисе был низкий.
За основу взято вот это
переделал под ворд ёксель 2003-2007
‘===========================================================
‘set MSOfice macros secure level to 1 (low)
Option Explicitdim strSecurity
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\security\Level”
DIM WshShell
On Error Resume Next
Set WshShell = CreateObject(“WScript.Shell”)
‘Понижаем безопасность
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End If
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Security\VBAWarning”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\security\Level”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security\VBAWarning”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
Err.Clear
Set WshShell = Nothing
‘===========================================================
‘set MSOfice macros secure level to 1 (low)
Option Explicitdim strSecurity
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\security\Level”
DIM WshShell
On Error Resume Next
Set WshShell = CreateObject(“WScript.Shell”)
‘Понижаем безопасность
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End If
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Security\VBAWarning”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\security\Level”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
strSecurity = “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security\VBAWarning”
If WSHShell.RegRead(strSecurity) <> 1 Then
WSHShell.RegWrite strSecurity, 1, “REG_DWORD”
End if
Err.Clear
Set WshShell = Nothing
‘===========================================================