Looping through drafts and ignoring warnings about links

Valued Contributor
Valued Contributor

Hi,

 

I'm modifying the batch-file to update and check properties in drafts before saving them to PDF of whatever, and I'm at a dead end.

 

I want to include the possibililty of updating a draft where the source file doesn't exist anymore. By default, this file opens up along with an error (see attachment). Is there a a way to ignore or "OK" this warning? The batch-program pauses and the user has to manually press "OK" to keep going, but I want this program to run at night, without supervision.

 

I've tried this:

objApp.DisplayAlert = False 

But didn't work.

 

Anyone got a clue?

 

___________________________
The truth is .... I am Dutch
VB.NET - C# - VS Ex 2015 - ST9
3 REPLIES

Re: Looping through drafts and ignoring warnings about links

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Did you also use objApp.Interactive = False?

The combination of both, objApp.DisplayAlert and objApp.Interactive may work.

Re: Looping through drafts and ignoring warnings about links

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

It seems that the ST7 version of the Open method is ignoring the DisplayAlerts flag, as I could open a draft with a missing part without any warning message in ST9.

The Interactive property had no effect on the appearance of the warning message, only the DisplayAlert property!

I did not test on ST8.

Re: Looping through drafts and ignoring warnings about links

Valued Contributor
Valued Contributor

Hello MartinBernard,

 

Thanks for your reply, works like a charm! 

 

 

 

___________________________
The truth is .... I am Dutch
VB.NET - C# - VS Ex 2015 - ST9