excel VBA to Automatically select Yes when prompted during mail merge

前端 未结 2 456
终归单人心
终归单人心 2021-01-06 17:18

I\'d like the system to be as automated for my users as possible. Right now, I have code that runs when the user clicks a button. The code takes data with the intention of a

相关标签:
2条回答
  • 2021-01-06 17:40

    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
    
    0 讨论(0)
  • 2021-01-06 17:57

    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.
    
    0 讨论(0)
提交回复
热议问题