<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>脚注 | You Look Too Cool</title>
	<atom:link href="https://stabucky.com/wp/archives/tag/%e8%84%9a%e6%b3%a8/feed" rel="self" type="application/rss+xml" />
	<link>https://stabucky.com/wp</link>
	<description>ゆるくつくる stabuckyのブログ</description>
	<lastBuildDate>Sat, 28 Dec 2024 08:51:58 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://stabucky.com/wp/wp-content/uploads/2024/05/cropped-stabucky-32x32.png</url>
	<title>脚注 | You Look Too Cool</title>
	<link>https://stabucky.com/wp</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Wordの脚注と括弧書きを相互に変換するマクロ</title>
		<link>https://stabucky.com/wp/archives/4854</link>
					<comments>https://stabucky.com/wp/archives/4854#comments</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Wed, 20 Feb 2013 11:55:41 +0000</pubDate>
				<category><![CDATA[Word]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[脚注]]></category>
		<guid isPermaLink="false">http://stabucky.com/wp/?p=4854</guid>

					<description><![CDATA[目次 概要マクロ宣言部分脚注を括弧に括弧を脚注に 概要 Wordの脚注部分を本文中に移動させるマクロを考えてみました。 脚注は注意書きが各ページの下部に表示されるイメージですが、これを括弧で括って本文中に戻します。これに [&#8230;]]]></description>
										<content:encoded><![CDATA[
  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">概要</a></li><li><a href="#toc2" tabindex="0">マクロ</a><ol><li><a href="#toc3" tabindex="0">宣言部分</a></li><li><a href="#toc4" tabindex="0">脚注を括弧に</a></li><li><a href="#toc5" tabindex="0">括弧を脚注に</a></li></ol></li></ol>
    </div>
  </div>

<h2><span id="toc1">概要</span></h2>
<p>Wordの脚注部分を本文中に移動させるマクロを考えてみました。<br />
脚注は注意書きが各ページの下部に表示されるイメージですが、これを括弧で括って本文中に戻します。これによりテキストファイルにしても注意書きが失われません。<br />
逆に本文中の括弧書きを脚注に変換させるマクロも考えてみました。<br />
「（注意書き）」の「注意書き」の部分を脚注に表示します。括弧については全角括弧「（）」を想定していますが、書き換えれば「【】」や「《》」でも動作します。<br />
当然のことかもしれませんが、編集中の文書に変更を施しますので、マクロは文書を保存してから実行してください。できればバックアップを取ってください。例によってご利用は自己責任でお願いします。</p>
<h2><span id="toc2">マクロ</span></h2>
<h3><span id="toc3">宣言部分</span></h3>
<p>括弧については全角括弧「（）」を想定しています。<br />
「【】」や「《》」を使う場合はここを書き換えます。</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Const strstart = &quot;（&quot;<br />
Const strend = &quot;）&quot;</div></div>
<h3><span id="toc4">脚注を括弧に</span></h3>
<p>脚注の注意書きを本文中に挿入します。<br />
注意書きの取得はできたのですが、脚注位置の取得が難しいため、Wordの検索機能を利用し「^f」という脚注位置を表す特殊文字を注意書きに置換する手法を使っています。</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Sub 脚注を括弧に()<br />
&nbsp; &nbsp; Dim n As Long, kosu As Long<br />
&nbsp; &nbsp; Dim rt As String<br />
&nbsp; &nbsp; With ActiveDocument.Content<br />
&nbsp; &nbsp; &nbsp; &nbsp; kosu = ActiveDocument.Footnotes.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; For n = 1 To kosu<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With ActiveDocument.Footnotes(1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rt = .Range.Text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection.Find.Replacement.ClearFormatting<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With Selection.Find<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Text = &quot;^f&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Replacement.Text = strstart &amp; rt &amp; strend<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Wrap = wdFindContinue '処理を継続。<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchWildcards = False '特殊文字を検索。<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection.Find.Execute Replace:=1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection.Font.Superscript = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; Next n<br />
&nbsp; &nbsp; End With<br />
&nbsp; &nbsp; Selection.HomeKey Unit:=wdStory<br />
End Sub</div></div>
<p>2014年9月1日追記<br />
上のマクロについては<a href="https://stabucky.com/wp/archives/6677" title="Wordで脚注を括弧書きに変換するマクロ">改良版</a>があります。</p>
<h3><span id="toc5">括弧を脚注に</span></h3>
<p>本文中の括弧書きを脚注に変換します。<br />
括弧書きの部分をワイルドカードを使って検索し、位置と文字列を取得、文字列の括弧を削除して、注意書きとしてセットするという手法です。</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Sub 括弧を脚注に()<br />
&nbsp; &nbsp; Dim kekka As Boolean<br />
&nbsp; &nbsp; Dim mojiretsu As String<br />
&nbsp; &nbsp; Do<br />
&nbsp; &nbsp; &nbsp; &nbsp; Selection.HomeKey Unit:=wdStory<br />
&nbsp; &nbsp; &nbsp; &nbsp; Selection.Find.ClearFormatting<br />
&nbsp; &nbsp; &nbsp; &nbsp; With Selection.Find<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Text = strstart &amp; &quot;*&quot; &amp; strend<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Replacement.Text = &quot;&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchPhrase = False '以下4行はワイルドカード使用時の矛盾回避のため。<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchSoundsLike = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchAllWordForms = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchFuzzy = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .MatchWildcards = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; kekka = Selection.Find.Execute<br />
&nbsp; &nbsp; &nbsp; &nbsp; If kekka Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '検索結果を整形。<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mojiretsu = Selection.Text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mojiretsu = Replace(mojiretsu, strstart, &quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mojiretsu = Replace(mojiretsu, strend, &quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection.Cut<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With Selection<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With .FootnoteOptions<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Location = wdBottomOfPage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .NumberingRule = wdRestartContinuous<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .StartingNumber = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .NumberStyle = wdNoteNumberStyleArabic<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Footnotes.Add Range:=Selection.Range, Reference:=&quot;&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection.TypeText Text:=mojiretsu<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; Loop Until kekka = False<br />
End Sub</div></div>
<p>括弧書きならばすべて変換してしまうので、通常の括弧は半角括弧、脚注にしたい部分は全角括弧やその他の記号を使うなど区別してください。あるいは変換したい部分だけ別文書にコピーしてマクロを実行してから戻すという方法も考えられます。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/4854/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Wordの脚注一覧を作成するマクロ</title>
		<link>https://stabucky.com/wp/archives/4852</link>
					<comments>https://stabucky.com/wp/archives/4852#comments</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Wed, 20 Feb 2013 11:53:53 +0000</pubDate>
				<category><![CDATA[Word]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[脚注]]></category>
		<guid isPermaLink="false">http://stabucky.com/wp/?p=4852</guid>

					<description><![CDATA[Word文書中の脚注を一覧にまとめるマクロです。 脚注の文字列を集めて、文書の最後に挿入します。 Sub 脚注一覧作成() &#160; &#160; Dim n, i As Long &#160; &#160; Dim [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Word文書中の脚注を一覧にまとめるマクロです。<br />
脚注の文字列を集めて、文書の最後に挿入します。<span id="more-4852"></span></p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:400px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Sub 脚注一覧作成()<br />
&nbsp; &nbsp; Dim n, i As Long<br />
&nbsp; &nbsp; Dim rt As String<br />
&nbsp; &nbsp; With ActiveDocument.Content<br />
&nbsp; &nbsp; &nbsp; &nbsp; .InsertAfter &quot;【脚注一覧】&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; .InsertParagraphAfter<br />
&nbsp; &nbsp; &nbsp; &nbsp; For n = 1 To ActiveDocument.Footnotes.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With ActiveDocument.Footnotes(n)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i = .Index<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rt = .Range.Text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .InsertAfter i &amp; &quot;&gt;&quot; &amp; rt<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .InsertParagraphAfter<br />
&nbsp; &nbsp; &nbsp; &nbsp; Next n<br />
&nbsp; &nbsp; End With<br />
End Sub</div></div>
<p><img fetchpriority="high" decoding="async" src="https://stabucky.com/wp/wp-content/uploads/2011/11/word_logo.png" alt="" width="300" height="295" class="alignnone size-full wp-image-11182" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/4852/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Writerで脚注挿入にショートカットを割り当てる</title>
		<link>https://stabucky.com/wp/archives/4735</link>
					<comments>https://stabucky.com/wp/archives/4735#respond</comments>
		
		<dc:creator><![CDATA[stabucky]]></dc:creator>
		<pubDate>Fri, 25 Jan 2013 22:21:54 +0000</pubDate>
				<category><![CDATA[LibreOffice]]></category>
		<category><![CDATA[ショートカット]]></category>
		<category><![CDATA[脚注]]></category>
		<category><![CDATA[設定]]></category>
		<guid isPermaLink="false">http://stabucky.com/wp/?p=4735</guid>

					<description><![CDATA[Wordの場合、Ctrl+Alt+Fで脚注が挿入できます。 Writerの場合は、このようなキーボードショートカットがありませんが、カスタマイズで設定することができます。LibreOffice3.6.4.3で確認しました [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Wordの場合、Ctrl+Alt+Fで脚注が挿入できます。<br />
Writerの場合は、このようなキーボードショートカットがありませんが、カスタマイズで設定することができます。LibreOffice3.6.4.3で確認しました。<span id="more-4735"></span></p>
<ol>
<li>ツール-カスタマイズを選択。</li>
<li>カスタマイズダイアログでキーボードタグを選択。</li>
<li>ショートカットキーでCtrl+Alt+Fを選択。</li>
<li>範囲で挿入を選択、機能で脚注/文末脚注の直接挿入を選択。</li>
<li>変更をクリック。</li>
<li>OKをクリック。カスタマイズダイアログを閉じる。</li>
</ol>
<p>脚注だけでなく色々と設定できます。</p>
<p><img decoding="async" src="https://stabucky.com/wp/wp-content/uploads/2018/10/LibreOffice_logo.jpg" alt="" width="300" height="300" class="alignnone size-full wp-image-11721" srcset="https://stabucky.com/wp/wp-content/uploads/2018/10/LibreOffice_logo.jpg 300w, https://stabucky.com/wp/wp-content/uploads/2018/10/LibreOffice_logo-150x150.jpg 150w" sizes="(max-width: 300px) 100vw, 300px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://stabucky.com/wp/archives/4735/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
