Hello, I’m doing mailmerge with regions using Aspose.Words for .NET, and I’m getting a “WebException occurred” error when calling
builder.InsertImage(imageFileName, width, height);
The specific error is: The remote server returned an error: (404) Not Found.
I need to programmatically return false if the image cannot be found or is not successfully inserted. I’ve tried using a try block and if/else statements with no luck. How can I capture and handle the 404 error?
Thank you in advance!