Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use c# dotnet code and I am facing an issue with mail merge doc generation. Everytime i do mail merge with image path from same server/different server i get a pop up notice -

"Microsoft office has detected a potential security concern. The document contains fields that can share data with external files and websites. It is important that this file is from a trustworthy source. Choosing yes will enable updating all fields in this file, until you close it"

and only when i click on yes, i get the mail merge doc generated with the image. Also adding to it, i get this pop up in the server where the site is hosted. Any help would be much appreciated.

What I have tried:

1. I have tried running with admin credentials everytime i do mail merge
2. Given full permission to the path where the doc is going to be generated
Posted
Updated 27-Apr-20 21:19pm
Comments
Richard MacCutchan 28-Apr-20 4:16am    
The message is clearly telling you that the mail merge could potentially include data that would compromise your messages. It is your responsibility to ensure that all merged data is safe to use. The best way to do that would be to make sure that all merge data is on the same system as the one where the merge process is running.
Garth J Lancaster 28-Apr-20 4:16am    
Does the same thing happen if the image/template is on your local machine ? - it would be nice if you could update your question with the minimum amount of code to illustrate the setup
Richard Deeming 29-Apr-20 9:03am    
You've tagged this as ASP.NET, so you need to read the following Microsoft knowledgebase article:
Considerations for server-side Automation of Office[^]
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900