excel VBA to Automatically select Yes when prompted during mail merge

扶醉桌前 提交于 2019-11-30 23:26:15

Try setting the DisplayAlerts property in Word (if that's where the alert is coming from):

Dim tmp as Long

tmp = wdDoc.Application.DisplayAlerts 

wdDoc.Application.DisplayAlerts = wdAlertsNone
'do the action which causes the prompt
wdDoc.Application.DisplayAlerts = tmp

http://support.microsoft.com/kb/825765

Word 2013

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options

"SQLSecurityCheck"=dword:00000000

Start Registry Editor.
Locate and then click the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options
On the Edit menu, point to New, and then click DWORD Value.
Under Name, type:

SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:

00000000
Click OK.

Word 2010

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options

"SQLSecurityCheck"=dword:00000000

Start Registry Editor.
Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options
On the Edit menu, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:
00000000
Click OK.

Word 2007

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options

"SQLSecurityCheck"=dword:00000000

Start Registry Editor.
Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options
On the Edit menu, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:
00000000
Click OK.

Word 2003

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

"SQLSecurityCheck"=dword:00000000

Start Registry Editor.
Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options
Click Edit, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:
00000000
Click OK.

Word 2002 Service Pack 3

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Word\Options

"SQLSecurityCheck"=dword:00000000

To do this, follow these steps:

Start Registry Editor.
Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Word\Options
Click Edit, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:
00000000
Click OK.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!