0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

フォルダ内の.msgファイルの宛先情報を一覧で取得する

Posted at

VBAで以下を実行する
フォルダパスの部分は変更する

Sub a()

Dim OL  As Object
Dim msg As Object

Set OL = CreateObject("Outlook.Application")
Set fso = CreateObject("Scripting.FileSystemObject")

For Each file In fso.getFolder("C:\XXXXXXXXXXXXXXXXXX\YYYYYYYYY\ZZZZZZZ").Files
    strFileName = file
    Set msg = OL.CreateItemFromTemplate(strFileName)
    Debug.Print "To: " & msg.To
Next

End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?