OneNoteをVBAでいじる - ページxmlの独自解析
下に抽出したxmlを掲載します。
[ノートシール]
自分は良く、タイトルにノートシールを貼ります。見た目ですね・・・。
こんな感じでノートシールは設定しています。
そして、xml内を確認すると、3行目に
のタグがあります。このタグ内のtypeがノートシールの番号、nameが自分が設定した名称だと推測できます。
[自分の入力した情報]
<![CDATA[ から ]]>内に入っています。これはxmlのCDATAセクションです。
[本文]
本文という言い方が正しいか不明ですが、
ですから本文をVBAで書き換えるためには、
<?xml version="1.0"?> <one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2013/onenote" ID="{123E4EFF-5678-901C-2345-67B89012345F}{6}{E78901234567890123456789012345678901234567890}" name="*添付ファイル" dateTime="2017-08-10T07:12:01.000Z" lastModifiedTime="2017-08-13T05:22:22.000Z" pageLevel="1" isCurrentlyViewed="true" selected="partial" lang="ja"> <one:TagDef index="0" type="2" symbol="107" fontColor="automatic" highlightColor="none" name="Mail"/> <one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="游ゴシック" fontSize="20.0" spaceBefore="0.0" spaceAfter="0.0"/> <one:QuickStyleDef index="1" name="p" fontColor="automatic" highlightColor="automatic" font="游ゴシック" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0"/> <one:PageSettings RTL="false" color="automatic"> <one:PageSize> <one:Automatic/> </one:PageSize> <one:RuleLines visible="false"/> </one:PageSettings> <one:Title showDate="false" showTime="false" selected="partial" lang="ja"> <one:OE author="User U" authorInitials="UU" authorResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxx="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" lastModifiedBy="User U" lastModifiedByInitials="UU" lastModifiedByResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxxx"/></resolutionId>" creationTime="2017-08-13T05:17:12.000Z" lastModifiedTime="2017-08-13T05:17:12.000Z" objectID="{xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}{xx}{B0}" alignment="left" quickStyleIndex="0" selected="partial"> <one:Tag index="0" completed="true" disabled="false" creationDate="2017-08-13T05:16:33.000Z" completionDate="2017-08-13T05:16:33.000Z"/> <one:T selected="all"> <![CDATA[ <span lang=en-US> * </span> <span lang=ja> 添付ファイル </span> ]]> </one:T> </one:OE> </one:Title> <one:Outline author="User U" authorInitials="UU" lastModifiedBy="User U" lastModifiedByInitials="UU" lastModifiedTime="2017-08-13T05:16:46.000Z" objectID="{xxxxxxxxxxxxxxxxxx-xxxx-xxxxxxxxxxxxx}{xx}{B0}"> <one:Position x="36.0" y="68.4000015258789" z="0"/> <one:Size width="105.75" height="101.6111755371094"/> <one:Indents> <one:Indent level="0" indent="1.05364627395842E-30"/> </one:Indents> <one:OEChildren> <one:OE authorResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" lastModifiedByResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" creationTime="2017-08-10T07:12:42.000Z" lastModifiedTime="2017-08-10T07:12:44.000Z" objectID="{xxxxxxxxxxxxxxxxxx-xxxx-xxxxxxxxxxxxx}{14}{B0}" alignment="left" quickStyleIndex="1"> <one:T> <![CDATA[これはテスト]]> </one:T> </one:OE> <one:OE authorResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" lastModifiedByResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" creationTime="2017-03-09T00:18:44.000Z" lastModifiedTime="2017-08-13T05:16:41.000Z" objectID="{xxxxxxxxxxxxxxxxxx-xxxx-xxxxxxxxxxxxx}{23}{B0}" alignment="left"> <one:InsertedFile pathCache="C:\Users\user\AppData\Local\Microsoft\OneNote\16.0\cache\00001AL8.bin" pathSource="C:\Temp\OneNoteAttachments\エクセル1.xlsx" preferredName="エクセル1.xlsx"/> </one:OE> <one:OE authorResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" lastModifiedByResolutionID="<resolutionId provider="Windows Live" hash="xxxxxxxxxxxxxxxxxxxxxxxx=="><localId cid="xxxxxxxxxxxxxxxx"/></resolutionId>" creationTime="2017-03-08T04:52:45.000Z" lastModifiedTime="2017-08-10T07:12:33.000Z" objectID="{xxxxxxxxxxxxxxxxxx-xxxx-xxxxxxxxxxxxx}{46}{B0}" alignment="left" quickStyleIndex="1" lang="en-US"> <one:T> <![CDATA[2017/3/8]]> </one:T> </one:OE> </one:OEChildren> </one:Outline> </one:Page>