{"id":1199,"date":"2012-01-18T16:19:48","date_gmt":"2012-01-18T07:19:48","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=1199"},"modified":"2016-09-12T16:26:23","modified_gmt":"2016-09-12T07:26:23","slug":"%e9%81%b8%e6%8a%9e%e7%af%84%e5%9b%b2%e5%86%85%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e6%a4%9c%e7%b4%a2%e3%82%92%e8%a1%8c%e3%81%86word%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=1199","title":{"rendered":"\u9078\u629e\u7bc4\u56f2\u5185\u3067\u6587\u5b57\u5217\u691c\u7d22\u3092\u884c\u3046Word\u30de\u30af\u30ed"},"content":{"rendered":"<p>\u4eca\u65e5\u306f\u9078\u629e\u7bc4\u56f2\u5185\u3067\u6587\u5b57\u5217\u691c\u7d22\u3092\u884c\u3046Word\u30de\u30af\u30ed\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u56f3\u306e\u3088\u3046\u306b\u7279\u5b9a\u306e\u7bc4\u56f2\u3092\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u3001\u305d\u306e\u7bc4\u56f2\u5185\u306e\u307f\u3092\u5bfe\u8c61\u306b\u6587\u5b57\u5217\u691c\u7d22\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u3069\u3046\u3059\u308b\u306e\u304b\uff1f\u307e\u305a\u306f\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306bSelection\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089Find\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3066\u51e6\u7406\u3092\u884c\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_01-150x150.jpg\" alt=\"\" title=\"WordSelFind_01\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1200\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_01-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_01-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample1()\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  With Selection.Find\r\n    .ClearFormatting\r\n    .ClearAllFuzzyOptions\r\n    .Text = SearchWords\r\n    .Replacement.Text = &quot;&quot;\r\n    .Forward = True\r\n    .Wrap = wdFindStop\r\n    .Format = False\r\n    .MatchCase = False\r\n    .MatchWholeWord = False\r\n    .MatchByte = False\r\n    .MatchAllWordForms = False\r\n    .MatchSoundsLike = False\r\n    .MatchWildcards = False\r\n    .MatchFuzzy = False\r\n    Do While .Execute\r\n      Selection.Range.HighlightColorIndex = wdRed\r\n    Loop\r\n  End With\r\nEnd Sub<\/pre>\n<p><!--more--><br \/>\n\u3059\u308b\u3068\u4e0b\u56f3\u306e\u3088\u3046\u306b\u6587\u7ae0\u672b\u307e\u3067\u691c\u7d22\u51e6\u7406\u304c\u884c\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\nSelection\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089Find\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u305f\u5834\u5408\u3001\u6587\u5b57\u5217\u304c\u30d2\u30c3\u30c8\u3059\u308b\u3068\u9078\u629e\u7bc4\u56f2\u304c\u5909\u66f4\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u3053\u308c\u306f\u5f53\u305f\u308a\u524d\u306e\u52d5\u4f5c\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_02-150x150.jpg\" alt=\"\" title=\"WordSelFind_02\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1201\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_02-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_02-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u6b21\u306fRange\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089Find\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3066\u51e6\u7406\u3092\u884c\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample2()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  Set r = Selection.Range\r\n  With r.Find\r\n    .ClearFormatting\r\n    .ClearAllFuzzyOptions\r\n    .Text = SearchWords\r\n    .Replacement.Text = &quot;&quot;\r\n    .Forward = True\r\n    .Wrap = wdFindStop\r\n    .Format = False\r\n    .MatchCase = False\r\n    .MatchWholeWord = False\r\n    .MatchByte = False\r\n    .MatchAllWordForms = False\r\n    .MatchSoundsLike = False\r\n    .MatchWildcards = False\r\n    .MatchFuzzy = False\r\n    Do While .Execute\r\n      r.HighlightColorIndex = wdRed\r\n    Loop\r\n  End With\r\n  Set r = Nothing\r\nEnd Sub<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u308c\u3082\u307e\u305f\u5148\u307b\u3069\u306eSelection\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306e\u691c\u7d22\u540c\u69d8\u306b\u6587\u7ae0\u672b\u307e\u3067\u691c\u7d22\u51e6\u7406\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_03-150x150.jpg\" alt=\"\" title=\"WordSelFind_03\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1202\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_03-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_03-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u3067\u306f\u3001\u4eca\u5ea6\u306fInRange\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u3066&#8221;<strong>\u30d2\u30c3\u30c8\u3057\u305f\u6587\u5b57\u5217\u304c\u9078\u629e\u7bc4\u56f2\u5185\u3060\u3063\u305f\u5834\u5408\u306e\u307f\u51e6\u7406\u3092\u884c\u3046<\/strong>&#8220;\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\nInRange\u30e1\u30bd\u30c3\u30c9\u306f\u3001<\/p>\n<p>&#8220;<strong><em>\u30e1\u30bd\u30c3\u30c9\u304c\u9069\u7528\u3055\u308c\u308b\u7bc4\u56f2\u304c\u5f15\u6570 Range \u306b\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u5185\u306b\u542b\u307e\u308c\u308b\u5834\u5408\u3001True \u3092\u8fd4\u3057\u307e\u3059<\/em><\/strong>&#8221;<\/p>\n<p>\u3068\u3044\u3046\u8aac\u660e\u306b\u3042\u308b\u3088\u3046\u306b\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u5bfe\u8c61\u304c\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u5185\u306b\u542b\u307e\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample3()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  Set r = Selection.Range\r\n  With r.Find\r\n    .ClearFormatting\r\n    .ClearAllFuzzyOptions\r\n    .Text = SearchWords\r\n    .Replacement.Text = &quot;&quot;\r\n    .Forward = True\r\n    .Wrap = wdFindStop\r\n    .Format = False\r\n    .MatchCase = False\r\n    .MatchWholeWord = False\r\n    .MatchByte = False\r\n    .MatchAllWordForms = False\r\n    .MatchSoundsLike = False\r\n    .MatchWildcards = False\r\n    .MatchFuzzy = False\r\n    Do While .Execute\r\n      '\u9078\u629e\u7bc4\u56f2\u5185\u306e\u5834\u5408\u306e\u307f\u51e6\u7406\u5b9f\u884c\r\n      If r.InRange(Selection.Range) Then\r\n        r.HighlightColorIndex = wdRed\r\n      End If\r\n    Loop\r\n  End With\r\n  Set r = Nothing\r\nEnd Sub<\/pre>\n<p>\u4eca\u5ea6\u306f\u4e0a\u624b\u304f\u3044\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_04-150x150.jpg\" alt=\"\" title=\"WordSelFind_04\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1203\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_04-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_04-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u3067\u3059\u304c\u3053\u306e\u51e6\u7406\u3082&#8221;<span style=\"color: #ff0000; font-weight: bold;\">\u9078\u629e\u7bc4\u56f2\u304c\u691c\u7d22\u8a9e\u3068\u540c\u3058\u3060\u3063\u305f\u5834\u5408<\/span>&#8220;\u306b\u306f\u4e0a\u624b\u304f\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_05.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_05-150x150.jpg\" alt=\"\" title=\"WordSelFind_05\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1204\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_05-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_05-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u305d\u308c\u3067\u306f\u3069\u3046\u3059\u308b\u306e\u304b\uff1f<br \/>\n\u3053\u308c\u306f\u3082\u3046\u5358\u7d14\u306b&#8221;<span style=\"color: #ff0000; font-weight: bold;\">\u9078\u629e\u7bc4\u56f2\u304c\u691c\u7d22\u8a9e\u3068\u540c\u3058\u3060\u3063\u305f\u5834\u5408<\/span>&#8220;\u3068&#8221;<span style=\"color: #ff0000; font-weight: bold;\">\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408<\/span>&#8220;\u3068\u306b\u51e6\u7406\u3092\u5206\u3051\u3066\u3057\u307e\u3048\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample4()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  Set r = Selection.Range\r\n  '\u9078\u629e\u7bc4\u56f2\u304c\u691c\u7d22\u8a9e\u3068\u540c\u3058\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\r\n  If r.Text = SearchWords Then\r\n    r.HighlightColorIndex = wdRed\r\n  Else\r\n    With r.Find\r\n      .ClearFormatting\r\n      .ClearAllFuzzyOptions\r\n      .Text = SearchWords\r\n      .Replacement.Text = &quot;&quot;\r\n      .Forward = True\r\n      .Wrap = wdFindStop\r\n      .Format = False\r\n      .MatchCase = False\r\n      .MatchWholeWord = False\r\n      .MatchByte = False\r\n      .MatchAllWordForms = False\r\n      .MatchSoundsLike = False\r\n      .MatchWildcards = False\r\n      .MatchFuzzy = False\r\n      Do While .Execute\r\n        '\u9078\u629e\u7bc4\u56f2\u5185\u306e\u5834\u5408\u306e\u307f\u51e6\u7406\u5b9f\u884c\r\n        If r.InRange(Selection.Range) Then\r\n          r.HighlightColorIndex = wdRed\r\n        End If\r\n      Loop\r\n    End With\r\n  End If\r\n  Set r = Nothing\r\nEnd Sub<\/pre>\n<p>\u3053\u308c\u3067\u3088\u3046\u3084\u304f\u610f\u56f3\u3057\u305f\u901a\u308a\u306b\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_06.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_06-150x150.jpg\" alt=\"\" title=\"WordSelFind_06\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1205\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_06-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_06-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u305f\u3060\u3001\u3053\u306e\u30b3\u30fc\u30c9\u306b\u3082\u7121\u99c4\u306a\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u305d\u308c\u306f\u30d2\u30c3\u30c8\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\u90e8\u5206\u3067\u3001\u9078\u629e\u7bc4\u56f2\u304c\u691c\u7d22\u8a9e\u3068\u540c\u3058\u3060\u3063\u305f\u5834\u5408\u3068\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306e\u51e6\u7406\u3068\u3067\u540c\u3058\u51e6\u7406\u3092\u4e8c\u91cd\u306b\u66f8\u3044\u3066\u3044\u308b\u305f\u3081\u3001\u30b3\u30fc\u30c9\u304c\u5197\u9577\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u300c<strong>r.HighlightColorIndex = wdRed<\/strong>\u300d\u3060\u3051\u306a\u306e\u3067\u3042\u307e\u308a\u6c17\u306b\u306a\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u3053\u308c\u304c\u3082\u3063\u3068\u7d30\u304b\u3044\u51e6\u7406\u306b\u306a\u308b\u3068\u3001\u30b3\u30fc\u30c9\u3082\u898b\u3065\u3089\u304f\u306a\u308a\u4fee\u6b63\u3059\u308b\u969b\u306e\u624b\u9593\u3082\u5897\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u305d\u308c\u3067\u306f\u3069\u3046\u3059\u308b\u306e\u304b\uff1f<br \/>\n\u3053\u3046\u3044\u3063\u305f\u3068\u304d\u306f\u5225\u9014Sub\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u7528\u610f\u3057\u3066\u51e6\u7406\u3092\u307e\u3068\u3081\u3066\u3057\u307e\u3048\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample5()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  Set r = Selection.Range\r\n  '\u9078\u629e\u7bc4\u56f2\u304c\u691c\u7d22\u8a9e\u3068\u540c\u3058\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\r\n  If r.Text = SearchWords Then\r\n    HitProc r\r\n  Else\r\n    With r.Find\r\n      .ClearFormatting\r\n      .ClearAllFuzzyOptions\r\n      .Text = SearchWords\r\n      .Replacement.Text = &quot;&quot;\r\n      .Forward = True\r\n      .Wrap = wdFindStop\r\n      .Format = False\r\n      .MatchCase = False\r\n      .MatchWholeWord = False\r\n      .MatchByte = False\r\n      .MatchAllWordForms = False\r\n      .MatchSoundsLike = False\r\n      .MatchWildcards = False\r\n      .MatchFuzzy = False\r\n      Do While .Execute\r\n        '\u9078\u629e\u7bc4\u56f2\u5185\u306e\u5834\u5408\u306e\u307f\u51e6\u7406\u5b9f\u884c\r\n        If r.InRange(Selection.Range) Then\r\n          HitProc r\r\n        End If\r\n      Loop\r\n    End With\r\n  End If\r\n  Set r = Nothing\r\nEnd Sub\r\n\r\nPrivate Sub HitProc(ByRef r As Word.Range)\r\n'\u30d2\u30c3\u30c8\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\r\n  r.Bold = True\r\n  r.Italic = True\r\n  r.Font.Color = wdColorWhite\r\n  r.HighlightColorIndex = wdRed\r\nEnd Sub<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u300c<span style=\"color: #ff0000; font-weight: bold;\">HitProc<\/span>\u300d\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u307e\u3068\u3081\u3066\u3044\u308b\u306e\u3067\u3001\u30d2\u30c3\u30c8\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\u306f\u305f\u3063\u305f1\u884c&#8221;<strong>HitProc r<\/strong>&#8220;\u3068\u3060\u3051\u66f8\u3051\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<br \/>\n\u79c1\u3082Word\u30de\u30af\u30ed\u306b\u7cbe\u901a\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u672c\u5f53\u306f\u3082\u3063\u3068\u52b9\u7387\u306e\u826f\u3044\u65b9\u6cd5\u304c\u3042\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3067\u76ee\u7684\u306e\u51e6\u7406\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3082\u3046\u4e00\u70b9\u3001Word 2007\u3067\u8ffd\u52a0\u3055\u308c\u305f<span style=\"color: #ff0000; font-weight: bold;\">HitHighlight<\/span>\u30e1\u30bd\u30c3\u30c9\u306e\u5834\u5408\u306fInRange\u30e1\u30bd\u30c3\u30c9\u3067\u7bc4\u56f2\u5224\u5b9a\u3092\u884c\u3046\u5fc5\u8981\u306a\u304f\u3001\u9078\u629e\u7bc4\u56f2\u306e\u307f\u3092\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample6()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n  \r\n  Set r = Selection.Range\r\n  With r.Find\r\n    .ClearFormatting\r\n    .ClearAllFuzzyOptions\r\n    .Text = &quot;&quot;\r\n    .Replacement.Text = &quot;&quot;\r\n    .Forward = True\r\n    .Wrap = wdFindStop\r\n    .Format = False\r\n    .MatchCase = False\r\n    .MatchWholeWord = False\r\n    .MatchByte = False\r\n    .MatchAllWordForms = False\r\n    .MatchSoundsLike = False\r\n    .MatchWildcards = False\r\n    .MatchFuzzy = False\r\n    .HitHighlight SearchWords\r\n  End With\r\n  Set r = Nothing\r\nEnd Sub<\/pre>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_07.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_07-150x150.jpg\" alt=\"\" title=\"WordSelFind_07\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1207\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_07-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordSelFind_07-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>HitHighlight\u30e1\u30bd\u30c3\u30c9\u306f\u30d2\u30c3\u30c8\u3057\u305f\u6587\u5b57\u5217\u3092\u5f37\u8abf\u8868\u793a\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u30d2\u30c3\u30c8\u3057\u305f\u6587\u5b57\u5217\u90e8\u5206\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u53d6\u5f97\u3067\u304d\u308bExecute\u30e1\u30bd\u30c3\u30c9\u3068\u306f\u7528\u9014\u304c\u5927\u304d\u304f\u7570\u306a\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u3053\u3046\u3057\u305f\u7d30\u304b\u3044\u52d5\u4f5c\u306e\u9055\u3044\u3092\u899a\u3048\u3066\u304a\u304f\u3068\u3001\u3069\u3053\u304b\u3067\u5f79\u306b\u7acb\u3064\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2016\/09\/12 \u8ffd\u8a18\uff1a<\/span><br \/>\nCollapse\u30e1\u30bd\u30c3\u30c9\u3092\u5165\u308c\u308b\u3053\u3068\u3067\u691c\u7d22\u8a9e\u5224\u5b9a\u3092\u5165\u308c\u308b\u3053\u3068\u306a\u304f\u51e6\u7406\u3067\u304d\u308b\u3053\u3068\u3092\u6559\u3048\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<br \/>\nIf\u6587\u304c\u306a\u304f\u306a\u308b\u306e\u3067\u5927\u5206\u30b9\u30de\u30fc\u30c8\u306b\u306a\u308a\u307e\u3059\u306d\uff01<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample7()\r\n  Dim r As Word.Range\r\n  Const SearchWords As String = &quot;\u6587\u66f8&quot;\r\n   \r\n  Set r = Selection.Range\r\n  r.Collapse wdCollapseStart '&lt;--\u8ffd\u52a0\r\n  With r.Find\r\n    .ClearFormatting\r\n    .ClearAllFuzzyOptions\r\n    .Text = SearchWords\r\n    .Replacement.Text = &quot;&quot;\r\n    .Forward = True\r\n    .Wrap = wdFindStop\r\n    .Format = False\r\n    .MatchCase = False\r\n    .MatchWholeWord = False\r\n    .MatchByte = False\r\n    .MatchAllWordForms = False\r\n    .MatchSoundsLike = False\r\n    .MatchWildcards = False\r\n    .MatchFuzzy = False\r\n    Do While .Execute\r\n      '\u9078\u629e\u7bc4\u56f2\u5185\u306e\u5834\u5408\u306e\u307f\u51e6\u7406\u5b9f\u884c\r\n      If r.InRange(Selection.Range) Then\r\n        r.HighlightColorIndex = wdRed\r\n      End If\r\n    Loop\r\n  End With\r\n  Set r = Nothing\r\nEnd Sub<\/pre>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"\u4eca\u65e5\u306f\u9078\u629e\u7bc4\u56f2\u5185\u3067\u6587\u5b57\u5217\u691c\u7d22\u3092\u884c\u3046Word\u30de\u30af\u30ed\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u307e\u3059\u3002 \u4e0b\u56f3\u306e\u3088\u3046\u306b\u7279\u5b9a\u306e\u7bc4\u56f2\u3092\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u3001\u305d\u306e\u7bc4\u56f2\u5185\u306e\u307f\u3092\u5bfe\u8c61\u306b\u6587\u5b57\u5217\u691c\u7d22\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u3069\u3046\u3059\u308b\u306e\u304b\uff1f\u307e\u305a\u306f\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306bSelection\u30aa\u30d6\u30b8 [&hellip;]","protected":false},"author":1,"featured_media":7134,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,49],"tags":[11,45,85],"class_list":["post-1199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-word-office","tag-office-2","tag-word-","tag-word-vba-2"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Word.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-jl","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1199"}],"version-history":[{"count":11,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1199\/revisions"}],"predecessor-version":[{"id":7343,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1199\/revisions\/7343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7134"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}