cancel open image
How can I find out if the user has clicked 'cancel' when opening an image?
0
Answers
-
Do you do it by macro command? Then the command will have empty output.
Public Function OpenImage() As SimpleScript OpenImage = New SimpleScript Dim docList1 = New List(1), doc1 With Application.DocumentCommands.OpenImage(OpenImage) .Filenames = Nothing'user prompt .Run(docList1) End With If docList1 Is Nothing Then Exit Function'user canceled open End If With Application.DocumentCommands.Activate(OpenImage) .Run(docList1(0), doc1) End With End Function
Yuri0 -
Hi Yuri
I have just solved my own problem. All I needed was to check the number of documentsThisApplication.Documents.Count Thanks anyway
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions