This content has been marked as final. Show 4 replies
Have you tried the scripting documentation? It's at the InDesign scripting home page, which is listed at the top of this forum. The chapter on working with events should answer your question.
I had read the scripting document. and try to port the VBScript codes to be VB.Net Codes. However, EventListener.Add() required a Object
type handler. So that I have no idea about what should I pass such type for this parameter.
I wounder, Is it possible that a pure VB.Net coded Application driving the Indesign DOM Object with event handler?
Really don't want to deal with the C++.
Here's the template for the EventListeners.Add method:
Function Add(EventType As String, Handler, [Captures As Boolean = False]) As EventListener
The qualifying event strings for the EventType parameter are shown in the documentation. The Handler parameter is a reference to a file--a VBScript file on disk. The event will pass parameters to this file when it triggers.
As I said, I don't think you can have a "pure" VB.NET application that works with events.
You're welcome to try the C++ API (which doesn't work with events in the same way at all), but I think you'd be better off using VBScripts for the event handlers.
Thank you Ole,
Finally, I give out the "pure" VB.NET approach and move to pure C++ approach. The Scripting API did not provide sufficient event for my project.