excel VBA to Automatically select Yes when prompted during mail merge

前端 未结 2 482
终归单人心
终归单人心 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
    

提交回复
热议问题