{"id":7138,"date":"2016-07-19T15:39:46","date_gmt":"2016-07-19T06:39:46","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=7138"},"modified":"2016-07-19T15:39:46","modified_gmt":"2016-07-19T06:39:46","slug":"%e3%83%86%e3%82%b9%e3%83%88%e7%94%a8%e3%81%ae%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8bword%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=7138","title":{"rendered":"\u30c6\u30b9\u30c8\u7528\u306e\u6587\u5b57\u5217\u3092\u633f\u5165\u3059\u308bWord\u30de\u30af\u30ed"},"content":{"rendered":"<p>\u6587\u5b57\u5217\u64cd\u4f5c\u3092\u884c\u3046\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u3044\u308b\u3068\u304d\u3001\u30c6\u30b9\u30c8\u7528\u306b\u300c\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u2026\u300d\u3068\u9069\u5f53\u306a\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u6bce\u56de\u6bce\u56de\u5165\u529b\u3059\u308b\u306e\u306f\u5927\u5909\u306a\u306e\u3067\u3001\u9069\u5f53\u306a\u6587\u5b57\u5217\u3092\u633f\u5165\u3059\u308b\u30de\u30af\u30ed\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  InsertDummyString 2, 3, True, &quot;,&quot; '\u90fd\u9053\u5e9c\u770c,3\u56de\u7e70\u308a\u8fd4\u3057,&#x5B;&quot;]\u56f2\u307f,&#x5B;,]\u533a\u5207\u308a\r\nEnd Sub\r\n\r\nPublic Sub InsertDummyString(Optional ByVal TextType As Integer = 0, _\r\n                             Optional ByVal RepeatCount As Integer = 1, _\r\n                             Optional ByVal OptQuot As Boolean = False, _\r\n                             Optional ByVal OptSep As String = &quot;&quot;)\r\n'\u30c6\u30b9\u30c8\u7528\u6587\u5b57\u5217\u633f\u5165\r\n  Dim aryAiueo As Variant\r\n  Dim aryIroha As Variant\r\n  Dim aryTodohuken As Variant\r\n  Dim aryEto As Variant\r\n  Dim aryJikkan As Variant\r\n  Dim aryKensei As Variant\r\n  Dim ary As Variant\r\n  Dim str As String\r\n  Dim i As Long, j As Long\r\n  \r\n  aryAiueo = Array(&quot;\u3042&quot;, &quot;\u3044&quot;, &quot;\u3046&quot;, &quot;\u3048&quot;, &quot;\u304a&quot;, _\r\n                   &quot;\u304b&quot;, &quot;\u304d&quot;, &quot;\u304f&quot;, &quot;\u3051&quot;, &quot;\u3053&quot;, _\r\n                   &quot;\u3055&quot;, &quot;\u3057&quot;, &quot;\u3059&quot;, &quot;\u305b&quot;, &quot;\u305d&quot;, _\r\n                   &quot;\u305f&quot;, &quot;\u3061&quot;, &quot;\u3064&quot;, &quot;\u3066&quot;, &quot;\u3068&quot;, _\r\n                   &quot;\u306a&quot;, &quot;\u306b&quot;, &quot;\u306c&quot;, &quot;\u306d&quot;, &quot;\u306e&quot;, _\r\n                   &quot;\u306f&quot;, &quot;\u3072&quot;, &quot;\u3075&quot;, &quot;\u3078&quot;, &quot;\u307b&quot;, _\r\n                   &quot;\u307e&quot;, &quot;\u307f&quot;, &quot;\u3080&quot;, &quot;\u3081&quot;, &quot;\u3082&quot;, _\r\n                   &quot;\u3084&quot;, &quot;\u3086&quot;, &quot;\u3088&quot;, _\r\n                   &quot;\u3089&quot;, &quot;\u308a&quot;, &quot;\u308b&quot;, &quot;\u308c&quot;, &quot;\u308d&quot;, _\r\n                   &quot;\u308f&quot;, &quot;\u3090&quot;, &quot;\u3091&quot;, &quot;\u3092&quot;, &quot;\u3093&quot;)\r\n  aryIroha = Array(&quot;\u3044&quot;, &quot;\u308d&quot;, &quot;\u306f&quot;, &quot;\u306b&quot;, &quot;\u307b&quot;, &quot;\u3078&quot;, &quot;\u3068&quot;, _\r\n                   &quot;\u3061&quot;, &quot;\u308a&quot;, &quot;\u306c&quot;, &quot;\u308b&quot;, &quot;\u3092&quot;, _\r\n                   &quot;\u308f&quot;, &quot;\u304b&quot;, &quot;\u3088&quot;, &quot;\u305f&quot;, &quot;\u308c&quot;, &quot;\u305d&quot;, _\r\n                   &quot;\u3064&quot;, &quot;\u306d&quot;, &quot;\u306a&quot;, &quot;\u3089&quot;, &quot;\u3080&quot;, _\r\n                   &quot;\u3046&quot;, &quot;\u3090&quot;, &quot;\u306e&quot;, &quot;\u304a&quot;, &quot;\u304f&quot;, &quot;\u3084&quot;, &quot;\u307e&quot;, _\r\n                   &quot;\u3051&quot;, &quot;\u3075&quot;, &quot;\u3053&quot;, &quot;\u3048&quot;, &quot;\u3066&quot;, _\r\n                   &quot;\u3042&quot;, &quot;\u3055&quot;, &quot;\u304d&quot;, &quot;\u3086&quot;, &quot;\u3081&quot;, &quot;\u307f&quot;, &quot;\u3057&quot;, _\r\n                   &quot;\u3091&quot;, &quot;\u3072&quot;, &quot;\u3082&quot;, &quot;\u305b&quot;, &quot;\u3059&quot;)\r\n  aryTodohuken = Array(&quot;\u5317\u6d77\u9053&quot;, &quot;\u9752\u68ee\u770c&quot;, &quot;\u5ca9\u624b\u770c&quot;, &quot;\u5bae\u57ce\u770c&quot;, &quot;\u79cb\u7530\u770c&quot;, _\r\n                       &quot;\u5c71\u5f62\u770c&quot;, &quot;\u798f\u5cf6\u770c&quot;, &quot;\u8328\u57ce\u770c&quot;, &quot;\u6803\u6728\u770c&quot;, &quot;\u7fa4\u99ac\u770c&quot;, _\r\n                       &quot;\u57fc\u7389\u770c&quot;, &quot;\u5343\u8449\u770c&quot;, &quot;\u6771\u4eac\u90fd&quot;, &quot;\u795e\u5948\u5ddd\u770c&quot;, &quot;\u65b0\u6f5f\u770c&quot;, _\r\n                       &quot;\u5bcc\u5c71\u770c&quot;, &quot;\u77f3\u5ddd\u770c&quot;, &quot;\u798f\u4e95\u770c&quot;, &quot;\u5c71\u68a8\u770c&quot;, &quot;\u9577\u91ce\u770c&quot;, _\r\n                       &quot;\u5c90\u961c\u770c&quot;, &quot;\u9759\u5ca1\u770c&quot;, &quot;\u611b\u77e5\u770c&quot;, &quot;\u4e09\u91cd\u770c&quot;, &quot;\u6ecb\u8cc0\u770c&quot;, _\r\n                       &quot;\u4eac\u90fd\u5e9c&quot;, &quot;\u5927\u962a\u5e9c&quot;, &quot;\u5175\u5eab\u770c&quot;, &quot;\u5948\u826f\u770c&quot;, &quot;\u548c\u6b4c\u5c71\u770c&quot;, _\r\n                       &quot;\u9ce5\u53d6\u770c&quot;, &quot;\u5cf6\u6839\u770c&quot;, &quot;\u5ca1\u5c71\u770c&quot;, &quot;\u5e83\u5cf6\u770c&quot;, &quot;\u5c71\u53e3\u770c&quot;, _\r\n                       &quot;\u5fb3\u5cf6\u770c&quot;, &quot;\u9999\u5ddd\u770c&quot;, &quot;\u611b\u5a9b\u770c&quot;, &quot;\u9ad8\u77e5\u770c&quot;, &quot;\u798f\u5ca1\u770c&quot;, _\r\n                       &quot;\u4f50\u8cc0\u770c&quot;, &quot;\u9577\u5d0e\u770c&quot;, &quot;\u718a\u672c\u770c&quot;, &quot;\u5927\u5206\u770c&quot;, &quot;\u5bae\u5d0e\u770c&quot;, _\r\n                       &quot;\u9e7f\u5150\u5cf6\u770c&quot;, &quot;\u6c96\u7e04\u770c&quot;)\r\n  aryEto = Array(&quot;\u5b50&quot;, &quot;\u4e11&quot;, &quot;\u5bc5&quot;, &quot;\u536f&quot;, _\r\n                 &quot;\u8fb0&quot;, &quot;\u5df3&quot;, &quot;\u5348&quot;, &quot;\u672a&quot;, _\r\n                 &quot;\u7533&quot;, &quot;\u9149&quot;, &quot;\u620c&quot;, &quot;\u4ea5&quot;)\r\n  aryJikkan = Array(&quot;\u7532&quot;, &quot;\u4e59&quot;, &quot;\u4e19&quot;, &quot;\u4e01&quot;, &quot;\u620a&quot;, _\r\n                    &quot;\u5df1&quot;, &quot;\u5e9a&quot;, &quot;\u8f9b&quot;, &quot;\u58ec&quot;, &quot;\u7678&quot;)\r\n  aryKensei = Array(&quot;\u5185\u95a3\u5e9c&quot;, &quot;\u5fa9\u8208\u5e81&quot;, &quot;\u7dcf\u52d9\u7701&quot;, &quot;\u6cd5\u52d9\u7701&quot;, &quot;\u5916\u52d9\u7701&quot;, _\r\n                    &quot;\u8ca1\u52d9\u7701&quot;, &quot;\u6587\u90e8\u79d1\u5b66\u7701&quot;, &quot;\u539a\u751f\u52b4\u50cd\u7701&quot;, &quot;\u8fb2\u6797\u6c34\u7523\u7701&quot;, &quot;\u7d4c\u6e08\u7523\u696d\u7701&quot;, _\r\n                    &quot;\u56fd\u571f\u4ea4\u901a\u7701&quot;, &quot;\u74b0\u5883\u7701&quot;, &quot;\u9632\u885b\u7701&quot;)\r\n  ary = Array(aryAiueo, aryIroha, aryTodohuken, _\r\n              aryEto, aryJikkan, aryKensei)\r\n  Select Case TextType\r\n    Case LBound(ary) To UBound(ary)\r\n    Case Else: TextType = 0\r\n  End Select\r\n  Select Case RepeatCount\r\n    Case 1 To 99\r\n    Case Else: RepeatCount = 1\r\n  End Select\r\n  \r\n  str = &quot;&quot;\r\n  For j = 1 To RepeatCount\r\n    For i = LBound(ary(TextType)) To UBound(ary(TextType))\r\n      If OptQuot = True Then\r\n        str = str &amp; ChrW(&amp;H22) &amp; ary(TextType)(i) &amp; ChrW(&amp;H22)\r\n      Else\r\n        str = str &amp; ary(TextType)(i)\r\n      End If\r\n      If i &lt;&gt; UBound(ary(TextType)) Then str = str &amp; OptSep\r\n    Next\r\n    If j &lt;&gt; RepeatCount Then str = str &amp; OptSep\r\n  Next\r\n  Selection.TypeText str\r\nEnd Sub<\/pre>\n<p>\u4e94\u5341\u97f3\u9806\u3084\u3044\u308d\u306f\u9806\u306e\u5e73\u4eee\u540d\u3084\u90fd\u9053\u5e9c\u770c\u3001\u5e72\u652f\u3068\u3044\u3063\u305f\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u305f\u56de\u6570\u5206\u7e70\u308a\u8fd4\u3057\u3066\u633f\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n(\u30aa\u30de\u30b1\u3068\u3057\u3066\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u56f2\u307f\u3084\u533a\u5207\u308a\u6587\u5b57\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002)<\/p>\n<p><a href=\"https:\/\/ja.wikipedia.org\/wiki\/Lorem_ipsum\" title=\"Lorem ipsum - Wikipedia\" target=\"_blank\">Lorem ipsum<\/a>\u306e\u3088\u3046\u306a\u30c0\u30df\u30fc\u30c6\u30ad\u30b9\u30c8\u3067\u3082\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001Word\u306b\u306f\u5143\u3005\u300c<a href=\"https:\/\/support.microsoft.com\/ja-jp\/kb\/212251\" title=\"\u30b5\u30f3\u30d7\u30eb \u30c6\u30ad\u30b9\u30c8\u3092 Word \u306e\u6587\u66f8\u306b\u633f\u5165\u3059\u308b\u65b9\u6cd5\" target=\"_blank\">rand() \u95a2\u6570<\/a>\u300d\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u6587\u7ae0\u306e\u5834\u5408\u306f\u305d\u3061\u3089\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6587\u5b57\u5217\u64cd\u4f5c\u3092\u884c\u3046\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u3044\u308b\u3068\u304d\u3001\u30c6\u30b9\u30c8\u7528\u306b\u300c\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u2026\u300d\u3068\u9069\u5f53\u306a\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u6bce\u56de\u6bce\u56de\u5165\u529b\u3059\u308b\u306e\u306f\u5927\u5909\u306a\u306e\u3067\u3001\u9069\u5f53\u306a\u6587\u5b57\u5217\u3092\u633f\u5165\u3059\u308b\u30de\u30af\u30ed\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 Option [&hellip;]","protected":false},"author":1,"featured_media":7136,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[\u30c6\u30b9\u30c8\u7528\u306e\u6587\u5b57\u5217\u3092\u633f\u5165\u3059\u308bWord\u30de\u30af\u30ed]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,49],"tags":[],"class_list":["post-7138","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-word-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-WordVBA.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1R8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7138","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=7138"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7138\/revisions"}],"predecessor-version":[{"id":7139,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7138\/revisions\/7139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7136"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}