The MachineIdOfMachineName method returns a machine identifier for a specified computer. The machine identifier can be used to create the format name of a machine journal.
machineId=MachineIdOfMachineName("MachineName")As String
For information on return codes, see MSMQ Error and Information Codes.