<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>kazukazuの備忘録</title>
<link>https://ameblo.jp/kowarusukey/</link>
<atom:link href="https://rssblog.ameba.jp/kowarusukey/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>~物忘れが激しいのでペタペタ~</description>
<language>ja</language>
<item>
<title>ga</title>
<description>
<![CDATA[ <p>T_CH<a href="https://stat.ameba.jp/user_images/20240216/23/kowarusukey/f2/cc/j/o0229022915402390775.jpg"><img alt="" height="229" src="https://stat.ameba.jp/user_images/20240216/23/kowarusukey/f2/cc/j/o0229022915402390775.jpg" width="229"></a></p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12840902799.html</link>
<pubDate>Fri, 16 Feb 2024 23:38:57 +0900</pubDate>
</item>
<item>
<title>Selenium</title>
<description>
<![CDATA[ <p>Declare PtrSafe Sub mouse_event Lib "USER32" (ByVal dwFlags As Long, _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Optional ByVal dx As Long = 0, _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Optional ByVal dy As Long = 0, _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Optional ByVal dwDate As Long = 0, _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Optional ByVal dwExtraInfo As Long = 0)<br>Declare PtrSafe Function SetCursorPos Lib "USER32" (ByVal x As Long, ByVal y As Long) As Long<br><br><br>Sub sample()<br>&nbsp; &nbsp; Dim driver As New selenium.WebDriver<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Dim myBy As New By<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; driver.Start "chrome"<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:01")<br>&nbsp; &nbsp; driver.Get "https://www.yahoo.co.jp/"<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:05")<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; If driver.IsElementPresent(myBy.XPath("//*[@id=""Perorin""]/div/div/div[2]/a")) Then<br>&nbsp; &nbsp; &nbsp; &nbsp;'MsgBox "ある"<br>&nbsp; &nbsp; &nbsp; &nbsp;driver.FindElementByXPath("//*[@id=""Perorin""]/div/div/div[2]/a").Click<br>&nbsp; &nbsp; Else<br>&nbsp; &nbsp; &nbsp; &nbsp;'MsgBox "ない"<br>&nbsp; &nbsp; End If<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:01")<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; TEXTT = Range("A1").Value<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; 'driver.FindElementByCss("#ContentWrapper &gt; header &gt; section._1o9PYyvuVafb5hd9eJ9rYX &gt; div &gt; form &gt; fieldset &gt; span &gt; input").SendKeys (TEXTT)<br>&nbsp; &nbsp; 'Driver.FindElementByCss("#ContentWrapper &gt; header &gt; section._1o9PYyvuVafb5hd9eJ9rYX &gt; div &gt; form &gt; fieldset &gt; span &gt; button").Click<br><br>&nbsp; &nbsp; 'Driver.SwitchToWindowByTitle ("Yahoo!JAPAN")<br><br>&nbsp; &nbsp; driver.ExecuteScript ("window.open('https://www.google.co.jp/')")<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:03")<br>&nbsp; &nbsp; driver.SwitchToPreviousWindow<br><br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; 'wTitle = driver.window.Title<br>&nbsp; &nbsp; 'driver.SwitchToWindowByTitle (wTitle)<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; '//*[@id="yDmH0d"]/c-wiz/div/div/c-wiz/div/div/div/div[2]/div[2]/button<br>&nbsp; &nbsp; If driver.IsElementPresent(myBy.Css("#yDmH0d &gt; c-wiz &gt; div &gt; div &gt; c-wiz &gt; div &gt; div &gt; div &gt; div.DRc6kd.bdn4dc &gt; div.QlyBfb &gt; button")) Then<br>&nbsp; &nbsp; &nbsp; &nbsp;'MsgBox "ある"<br>&nbsp; &nbsp; &nbsp; &nbsp;driver.FindElementByCss("#yDmH0d &gt; c-wiz &gt; div &gt; div &gt; c-wiz &gt; div &gt; div &gt; div &gt; div.DRc6kd.bdn4dc &gt; div.QlyBfb &gt; button").Click<br>&nbsp; &nbsp; Else<br>&nbsp; &nbsp; &nbsp; &nbsp;'MsgBox "ない"<br>&nbsp; &nbsp; End If<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:03")<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; driver.ExecuteScript ("window.open('https://www.google.com/maps?authuser=0')")<br>&nbsp; &nbsp; 'wTitle = driver.window.Title<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; 'https://www.google.com/maps?authuser=0<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; 'Driver.SwitchToWindowByTitle (wTitle)<br>&nbsp; &nbsp; 'Driver.SwitchToWindowByTitle ("Yahoo! JAPAN")<br><br>&nbsp; &nbsp; 'Driver.SwitchToNextWindow<br>&nbsp; &nbsp; 'driver.SwitchToPreviousWindow<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:05")<br>&nbsp; &nbsp; driver.SwitchToWindowByTitle ("Google")<br><br>&nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:01")<br><br>driver.FindElementByCss("#APjFqb").SendKeys (TEXTT)<br>Application.Wait Now() + TimeValue("00:00:07")<br><br><br>driver.FindElementByXPath("/html/body/div[1]/div[3]/form/div[1]/div[1]/div[2]/div[2]/div[5]/center/input[1]").Click<br><br>Application.Wait Now() + TimeValue("00:00:05")<br><br><br><br><br><br>&nbsp; &nbsp;&nbsp;<br><br><br><br><br><br><br>SERU = 1<br><br>&nbsp; &nbsp; Dim LinkURL As Variant 'As HTMLAnchorElement<br>&nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; For Each LinkURL In driver.FindElementsByTag("a").Attribute("href")<br>&nbsp; &nbsp; &nbsp; &nbsp; 'Debug.Print LinkURL<br>&nbsp; &nbsp; &nbsp; &nbsp; 'Application.Wait Now() + TimeValue("00:00:01")<br>&nbsp; &nbsp; &nbsp; &nbsp; Range("C" &amp; SERU).Value = LinkURL<br>&nbsp; &nbsp; &nbsp; &nbsp; SERU = SERU + 1<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Next LinkURL<br><br>Application.Wait Now() + TimeValue("00:00:03")<br>driver.FindElementByLinkText("https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q14230383004").Click<br><br><br><br>'’body &gt; div.L3eUgb &gt; div.o3j99.ikrT4e.om7nvf &gt; form &gt; div:nth-child(1) &gt; div.A8SBwf &gt; div.FPdoLc.lJ9FBc &gt; center &gt; input.gNO89b<br><br><br>Application.Wait Now() + TimeValue("00:00:01")<br>driver.Close<br><br>Application.Wait Now() + TimeValue("00:00:02")<br><br>driver.SwitchToNextWindow<br>driver.Close<br><br>Application.Wait Now() + TimeValue("00:00:02")<br><br>driver.SwitchToWindowByTitle ("Yahoo! JAPAN")<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>&nbsp; &nbsp; Dim WshShell As Object<br><br>&nbsp; &nbsp; &nbsp; &nbsp; Set WshShell = CreateObject("WScript.Shell")<br>&nbsp; &nbsp; &nbsp; &nbsp; With WshShell<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; Application.Wait Now() + TimeValue("00:00:03")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .SendKeys "^{W}", True<br><br>&nbsp; &nbsp; &nbsp; &nbsp; End With<br>&nbsp; &nbsp; &nbsp; &nbsp; Set WshShell = Nothing<br><br><br><br><br><br><br><br><br><br>&nbsp; &nbsp; 'Debug.Print Driver.IsElementPresent(myBy.XPath("//*[@id=""Perorin""]/div/div/div[2]/a"))<br>&nbsp; &nbsp; If driver.IsElementPresent(myBy.XPath("//*[@id=""Perorin""]/div/div/div[2]/a")) Then<br>&nbsp; &nbsp; &nbsp; &nbsp;MsgBox "ある"<br>&nbsp; &nbsp; &nbsp; &nbsp;driver.FindElementByXPath("//*[@id=""Perorin""]/div/div/div[2]/a").Click<br>&nbsp; &nbsp; Else<br>&nbsp; &nbsp; &nbsp; &nbsp;'MsgBox "ない"<br>&nbsp; &nbsp; End If<br><br><br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;&nbsp;<br>'//*[@id="Perorin"]/div/div/div[2]/a<br>&nbsp; &nbsp; driver.Close<br>&nbsp; &nbsp; Set driver = Nothing<br>End Sub<br><br><br>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12830501986.html</link>
<pubDate>Tue, 28 Nov 2023 23:43:00 +0900</pubDate>
</item>
<item>
<title>Word</title>
<description>
<![CDATA[ <p>Sub test()<br><br><br>Dim objWord As Word.Application<br>Set objWord = CreateObject("Word.Application")<br>objWord.Visible = True<br>&nbsp; &nbsp;&nbsp;<br>'--- 開くワードドキュメントのパス ---'<br>Dim docPath As String<br>docPath = "\\GAS 2014-08.pdf"<br><br>'--- 開いたワードドキュメントを格納する変数 ---'<br>Dim docDoc As Word.Document<br><br><br>Dim objDoc<br>Set objDoc = objWord.Documents.Open(docPath)<br><br><br>'On Error Resume Next<br>'Call AppActivate("GAS 2014-08 - Word")<br>'On Error GoTo 0<br><br><br>objDoc.StoryRanges(wdMainTextStory).Copy<br>'objDoc.Selection.Copy<br><br><br>'ThisWorkbook.Worksheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False<br>'ThisWorkbook.Worksheets("Sheet1").Range("A1").Paste<br>ActiveSheet.Paste<br><br>Range("A2").Select<br><br><br><br>Dim buf As New DataObject<br>buf.SetText ""<br>buf.PutInClipboard<br>'objWord.Documents.Close SaveChanges:=wdDoNotSaveChanges<br>objWord.Quit<br><br><br>End Sub</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12727445679.html</link>
<pubDate>Thu, 17 Feb 2022 21:55:26 +0900</pubDate>
</item>
<item>
<title>効果音のリンク（wavファイル）</title>
<description>
<![CDATA[ <p>https://soundcloud.com/user-483021709/1-1<br><br>https://soundcloud.com/user-483021709/2-1</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12689576267.html</link>
<pubDate>Sat, 31 Jul 2021 16:58:04 +0900</pubDate>
</item>
<item>
<title>罫線を察知するコード</title>
<description>
<![CDATA[ <p>Sub TEST()<br><br>Dim SERU&nbsp;As Long<br>Dim KEISEN<br><br>SERU= 1<br>For SERU&nbsp;= 1 To 100<br><br>&nbsp; &nbsp; Set KEISEN= Range("A" &amp; SERU).Borders<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; If KEISEN.LineStyle = -4142 Then<br>&nbsp; &nbsp; Else<br>&nbsp; &nbsp; &nbsp; &nbsp;MsgBox SERU&nbsp;&amp; " 行目。　　最終行取得成功！" &amp; vbCrLf &amp; _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "A" &amp; SERU&nbsp;&amp; " セルの周辺に罫線が存在します。", vbInformation, "成功"<br>&nbsp; &nbsp; End If<br><br>Next&nbsp;SERU<br><br><br>End Sub</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12688699426.html</link>
<pubDate>Mon, 26 Jul 2021 20:30:49 +0900</pubDate>
</item>
<item>
<title>バージョン確認　その他諸々</title>
<description>
<![CDATA[ <p>Sub OSバージョン確認1()<br>&nbsp;<br>&nbsp; MsgBox "OS Version : " &amp; Application.OperatingSystem, vbInformation<br>&nbsp;<br>End Sub<br><br><br>Sub OSバージョン確認2()<br>&nbsp; &nbsp; Dim Locator, Service, OsSet, os, msg As String<br>&nbsp; &nbsp; Set Locator = CreateObject("WbemScripting.SWbemLocator")<br>&nbsp; &nbsp; Set Service = Locator.ConnectServer<br>&nbsp; &nbsp; Set OsSet = Service.ExecQuery("Select * From Win32_OperatingSystem")<br>&nbsp; &nbsp; For Each os In OsSet<br>&nbsp; &nbsp; &nbsp; &nbsp; msg = msg &amp; os.Caption &amp; vbCrLf<br>&nbsp; &nbsp; &nbsp; &nbsp; msg = msg &amp; os.Version<br>&nbsp; &nbsp; Next os<br>&nbsp; &nbsp; MsgBox msg, vbInformation<br>&nbsp; &nbsp; Set Service = Nothing<br>&nbsp; &nbsp; Set OsSet = Nothing<br>&nbsp; &nbsp; Set Locator = Nothing<br>End Sub<br><br><br><br>Sub EXCELバージョン確認()<br>&nbsp; &nbsp; MsgBox Application.Version<br>End Sub</p><p>&nbsp;</p><p>指定NotePad起動</p><p>Sub TestMain()<br>&nbsp; &nbsp; Dim strFile As String, TTT As String<br>&nbsp; &nbsp; 'ファィルのフルパスを指定<br>&nbsp; &nbsp; strFile = "C:\Users\great\Desktop\777.txt"<br>&nbsp;&nbsp;<br>&nbsp; &nbsp; If Dir(strFile) = "" Then<br>&nbsp; &nbsp; &nbsp; &nbsp; MsgBox "ファイルが存在しません。"<br>&nbsp; &nbsp; &nbsp; &nbsp; Exit Sub<br>&nbsp; &nbsp; End If<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; TTT = "777"<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;Shell "notepad C:\Users\great\Desktop\" &amp; TTT &amp; ".txt", 1<br><br><br>End Sub</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12683076670.html</link>
<pubDate>Sun, 27 Jun 2021 13:40:59 +0900</pubDate>
</item>
<item>
<title>【上】フォルダ選択（ダイアログ）　【下】フォルダ内のすべてのファイルに対する処理</title>
<description>
<![CDATA[ <p>Sub Sample2()<br>&nbsp; &nbsp; Dim Shell, myPath<br>&nbsp; &nbsp; Set Shell = CreateObject("Shell.Application")<br>&nbsp; &nbsp; Set myPath = Shell.BrowseForFolder(&amp;O0, "フォルダを選んでください", &amp;H1 + &amp;H10, "C:\")<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; If Not myPath Is Nothing Then<br>&nbsp; &nbsp; &nbsp; &nbsp;MsgBox myPath.Items.Item.Path &amp; vbCrLf &amp; _<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myPath<br>&nbsp; &nbsp; Else<br>&nbsp; &nbsp; End If<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; Set Shell = Nothing<br>&nbsp; &nbsp; Set myPath = Nothing<br>End Sub</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>Sub OpenFilesInFolder()<br><br>&nbsp; &nbsp; Dim path, fso, file, files<br>&nbsp; &nbsp; path = "C:/Users/xxxxxx/フォルダ名/"<br>&nbsp; &nbsp; 'path = ThisWorkbook.Path &amp; "/フォルダ名/" &nbsp;'相対パスの場合<br>&nbsp; &nbsp; Set fso = CreateObject("Scripting.FileSystemObject")<br>&nbsp; &nbsp; Set files = fso.GetFolder(path).files<br><br>&nbsp; &nbsp; 'フォルダ内の全ファイルについて処理<br>&nbsp; &nbsp; For Each file In files<br><br>&nbsp; &nbsp; &nbsp; &nbsp; 'ファイルを開いてブックとして取得<br>&nbsp; &nbsp; &nbsp; &nbsp; Dim wb As Workbook<br>&nbsp; &nbsp; &nbsp; &nbsp; Set wb = Workbooks.Open(file)<br><br>&nbsp; &nbsp; &nbsp; &nbsp; 'ブックに対する処理<br><br>&nbsp; &nbsp; &nbsp; &nbsp; '保存せずに閉じる<br>&nbsp; &nbsp; &nbsp; &nbsp; Call wb.Close(SaveChanges:=False)<br><br>&nbsp; &nbsp; Next file<br><br>End Sub</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12682241646.html</link>
<pubDate>Wed, 23 Jun 2021 05:51:10 +0900</pubDate>
</item>
<item>
<title>フォルダごとコピー</title>
<description>
<![CDATA[ <p>Sub フォルダごとコピー()<br><br>&nbsp; &nbsp; Dim FSO As Object<br>&nbsp; &nbsp; Dim MOTO As Variant<br>&nbsp; &nbsp; Dim SAKI As Variant<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; MOTO = "C:\Users\great\Desktop\コピー元"<br>&nbsp; &nbsp; SAKI = "C:\Users\great\Desktop\新しいフォルダー\"<br><br>&nbsp; &nbsp; Set FSO = CreateObject("Scripting.FileSystemObject")<br><br>&nbsp; &nbsp; FSO.GetFolder(MOTO).Copy SAKI<br><br>&nbsp; &nbsp; Set FSO = Nothing<br><br>End Sub</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12681508712.html</link>
<pubDate>Sat, 19 Jun 2021 12:28:24 +0900</pubDate>
</item>
<item>
<title>ListBox</title>
<description>
<![CDATA[ <p>Dim MaxRow As Long<br><br>MaxRow = Cells(Rows.Count, 1).End(xlUp).Row<br>UserForm1.ListBox1.RowSource = "Sheet1!A1:A" &amp; MaxRow<br><br>UserForm1.Show</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12681465436.html</link>
<pubDate>Sat, 19 Jun 2021 07:58:17 +0900</pubDate>
</item>
<item>
<title>Outlookメール取得コード</title>
<description>
<![CDATA[ <p>Sub Sample1()<br>&nbsp;<br>&nbsp;Dim objOutlook, objNamespace, objFolder As Object<br>&nbsp;Dim i As Long<br>&nbsp;&nbsp;<br>&nbsp;'Outlookオブジェクトの生成<br>&nbsp;Set objOutlook = CreateObject("Outlook.Application")<br>&nbsp;'名前空間を取得<br>&nbsp;Set objNamespace = objOutlook.GetNamespace("MAPI")<br>&nbsp;'対象フォルダ選択用のダイアログボックスを表示する<br>&nbsp;Set objFolder = objNamespace.PickFolder<br>&nbsp;<br>&nbsp;On Error GoTo TTT<br>&nbsp;If objFolder = "" Then<br>TTT:<br>&nbsp; &nbsp; Exit Sub<br>&nbsp;Else<br>&nbsp;End If<br>&nbsp;&nbsp;<br>&nbsp;'対象フォルダ内全てのアイテムに対し処理を行う<br>&nbsp;For i = 1 To objFolder.Items.Count<br>&nbsp; &nbsp;'メールアイテムであれば処理実行<br>&nbsp; &nbsp;If objFolder.Items(i).Class = 43 Then<br>&nbsp; &nbsp; &nbsp; &nbsp;'「送信者名」をセルA列に書込み<br>&nbsp; &nbsp; &nbsp; &nbsp;Cells(i + 1, 1).Value = objFolder.Items(i).SenderName<br>&nbsp; &nbsp; &nbsp; &nbsp;'「メールタイトル」をセルB列に書込み<br>&nbsp; &nbsp; &nbsp; &nbsp;Cells(i + 1, 2).Value = objFolder.Items(i).Subject<br>&nbsp; &nbsp; &nbsp; &nbsp;'「受信日時」をセルC列に書込み<br>&nbsp; &nbsp; &nbsp; &nbsp;Cells(i + 1, 3).Value = objFolder.Items(i).ReceivedTime<br>&nbsp; &nbsp; &nbsp; &nbsp;'「本文」をセルD列に書込み<br>&nbsp; &nbsp; &nbsp; &nbsp;'Cells(i + 1, 4).Value = objFolder.Items(i).Body<br>&nbsp; &nbsp; &nbsp; &nbsp;´開封済みは否か<br>&nbsp; &nbsp; &nbsp; &nbsp;Cells(i + 1, 5).Value = objFolder.Items(i).UnRead<br>&nbsp; &nbsp; &nbsp; &nbsp;´分類取得<br>&nbsp; &nbsp; &nbsp; &nbsp;Cells(i + 1, 6).Value = objFolder.Items(i).Categories<br>&nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; End If<br>&nbsp; Next<br>&nbsp; &nbsp;<br>&nbsp; 'セットした変数を解除<br>&nbsp; Set objOutlook = Nothing<br>&nbsp; Set objNamespace = Nothing<br>&nbsp;<br>End Sub</p>
]]>
</description>
<link>https://ameblo.jp/kowarusukey/entry-12670383625.html</link>
<pubDate>Sat, 24 Apr 2021 08:35:19 +0900</pubDate>
</item>
</channel>
</rss>
