sol12-22.wsf

来自「Apress - Managing Enterprise Systems Wit」· WSF 代码 · 共 33 行

WSF
33
字号
<?xml version="1.0" ?>
<job>
<!--comment
Script:copymove.wsf
-->
 <script language="VBScript" src="maillib.vbs">
 <![CDATA[
  Dim objSession, objDestFolder, objSourceFolder, objCopiedMessage
  Dim objSourceMessage

  Set objSession = CreateObject("MAPI.Session")
  ' supply a valid profile
  objSession.Logon "Valid Profile"

  'get a reference to a destination folder, using the GetFolderObj 
  'function listed earlier in  this section
  Set objDestFolder = GetFolderObj(objSession, "Personal Mail\Backup")

  'get a reference to source folder to be copied..
  Set objSourceFolder = GetFolderObj(objSession, "Store Mail\Processed")

  'copy the source folder to the destination folder. The StoreID is passed 
  'since the destination folder is in a difference InfoStore than the 
  'original source message
  Set objNewCopiedFolder=objSourceFolder.CopyTo(objDestFolder.ID, _ 
                       objDestFolder.StoreID, , True)

  objSession.Logoff
  ]]>
  </script>
</job>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?