Home > Enterprise >  How to disable microsoft office potential security concern pop up while adding a page in word docume
How to disable microsoft office potential security concern pop up while adding a page in word docume

Time:01-17

I was trying to add one word document(docx) into an existing word document. I used below code

Sub InsertFile()
    Application.DisplayAlerts = False
    Selection.Collapse Direction:=wdCollapseEnd
    Selection.InsertFile FileName:="C:\Users\user\Downloads\Disclaimer.docx", Link:=True
End Sub

How to disable this pop up while running the macro-

enter image description here

Please help me to disable this pop up, I already tried this "Application.DisplayAlerts = False" but its not working here..

CodePudding user response:

Just insert the content instead of creating a link by using

Selection.InsertFile FileName:="C:\Users\user\Downloads\Disclaimer.docx", Link:=False

CodePudding user response:

File -> Options -> Trust Center -> Trust Center Settings -> Check Enable All Macros

  •  Tags:  
  • Related