Printed Form Interception

The 1C:Enterprise developers forum

People who like this:0Yes/0No
Active user
Rating: 4
Joined: Sep 16, 2011
Company: Oksley Shipping

I have the following task: There is a command which should handle opened printed forms, how can I enumerate them?

People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jul 20, 2011

There is a solution for the managed application mode. You can use GetWindows() function to enumerate the opened windows and then check in some way if this window contains the printed form. For example you can add a caption part “PrintedForm” for all windows with printed forms.
The part of the printed form generation code:

Spreadsheet = New SpreadsheetDocument;
The command to handle opened windows:
Procedure ProcessPrintedFormWindows(Command)
    OpenedWindows = GetWindows();
    For Each Window In OpenedWindows Do
        WindowCaption = Left(Window.Caption, 11);
        If WindowCaption = "PrintedForm" Then
            // Your code here

This won't work in the Ordinary Application mode.

Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.