InvisibleApp.QueueMarkerEvent Method
Visio Automation Reference |
Queues a MarkerEvent event that fires after all other queued events.
Version Information
Version Added: Visio 5.0
Syntax
expression.QueueMarkerEvent(ContextString, lpi4Ret)
expression A variable that represents an InvisibleApp object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ContextString | Required | String | An arbitrary string that is passed with the event that fires. |
Return Value
Long
Remarks
The QueueMarkerEvent method works in conjunction with the MarkerEvent event to allow an Automation client to queue an event to itself. The QueueMarkerEvent method causes the application to fire a MarkerEvent event after it has fired all the events in its event queue.
The QueueMarkerEvent method returns the sequence number of the MarkerEvent event to fire, and the string passed to the QueueMarkerEvent method (legally empty) is passed to the MarkerEvent event handler.
A client program can use either the sequence number or the string to correlate QueueMarkerEvent calls with MarkerEvent events. In this way, the client is able to distinguish events it caused and events it did not cause.
Example
Paste this example code into the ThisDocument object and then run the UseMarker procedure. The output will be displayed in the Microsoft Visual Basic for Applications (VBA) Immediate window.
Visual Basic for Applications |
---|
|
The output in the VBA Immediate window looks like this:
Marker: I am starting...
ShapeAdded: Sheet.1
Marker: I am finished...
See Also