Page 1 of 1

Tx Message From Transmit List Doc(.xmt) to Receive/transm

Posted: Mon 4. Mar 2013, 13:07
by Lufyoooo
Hi ,

I want to add all my tx message from transmit list document (.xmt) to "Receive/Transmit" window.
by using code(Macro file)

I'm able to open my transmit list document ,
"Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True) "

I saw the document and send all messages. but I can't see it from "Receive/Transmit" window.

and now I want to pause all the message
"Connections.TransmitMessages.PauseAll"
this code only work to pause all message in "Receive/Transmit" window. I want to pause all my message in "Mytransmit.xmt".

Do you know how to put the message from Mytransmit.xmt to "Receive/Transmit" window?

Thanks before.

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Posted: Mon 4. Mar 2013, 15:50
by K.Wolf
Hi,

Transmit List documents are always opened in a separate document window. The messages in the Receive/Transmit window are stored in the project file.
There is no easy way to put all messages from the transmit list document into the Receive Transmit window. In the user interface you could use the File->Import command, but this function cannot be automated through a macro without user interaction.
But you can control the messages in the transmit list window:

Code: Select all

Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True) 
doc.ActiveWindow.Object.Messages.PauseAll
The Connections.TransmitMessages collection only represents the transmit list in the Receive/Transmit window. But each open transmit list window has its own TransmitMessages collection, which you can control in the same way.

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Posted: Tue 5. Mar 2013, 10:48
by Lufyoooo
Hi ,

Thank you for your reply ,

I tried this example from help file and give warning ( how to fix this warning ?)
Sub KindExample()

' Open a text document before executing this example

Dim objDoc

Set objDoc = ActiveDocument

MsgBox "Kind of the active document: " & objDoc.Kind

End Sub


Your code

Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True)
doc.ActiveWindow.Object.Messages.PauseAll


I tried this code, and this code only for one spesific file,

and I want to Pause all my transmit list file which are opened or activate in window

so I do

dim win
For Each win In Windows

If win = Windows(peDocumentKindTransmit) Then
win.Object.Messages.PauseAll
end if

Next

it's work,
but it's only work to pause only one file not all my all active transmit file .

do you know how to pause all active transmit file at window?

Thank you

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Posted: Tue 5. Mar 2013, 16:05
by K.Wolf
Hi,

try this code:

Code: Select all

Dim win
For Each win In Windows
  If win.Kind = peDocumentKindTransmit Then
    win.Object.Messages.PauseAll
  End If
Next