{"id":711,"date":"2024-06-17T11:30:27","date_gmt":"2024-06-17T03:30:27","guid":{"rendered":"http:\/\/www.wyrcad.com\/?p=711"},"modified":"2024-06-17T16:34:17","modified_gmt":"2024-06-17T08:34:17","slug":"word-%e7%94%9f%e6%88%90%e8%a1%a8%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/www.wyrcad.com\/?p=711","title":{"rendered":"Microsoft Word \u751f\u6210\u8868\u683c"},"content":{"rendered":"\n<p>Dim oWord As Object<br>Call BindWord(True)<\/p>\n\n\n\n<p>Dim oDocument As Object<br>Set oDocument = oWord.ActiveDocument<br>Call NameList<\/p>\n\n\n\n<p>Public Sub NameList()<br>On Error Resume Next<br>Dim RowsCount, ColsCount As Integer<br>With oDocument<br>.Paragraphs(.Paragraphs.Count).Range.Font.Name = &#8220;\u5b8b\u4f53&#8221;<br>.Paragraphs(.Paragraphs.Count).Range.Font.Size = 12<br>.Paragraphs(.Paragraphs.Count).Range.Font.Bold = False<br>.Paragraphs(.Paragraphs.Count).Alignment = 1<br>.Paragraphs(.Paragraphs.Count).Range.Text = &#8220;\u82b1\u540d\u518c&#8221;<br>RowsCount = 3<br>ColsCount = 4<br>.Tables.Add Range:=.Range(Start:=.Range.End &#8211; 1, End:=.Range.End), NumRows:=RowsCount, NumColumns:=ColsCount, DefaultTableBehavior:=1, AutoFitBehavior:=2 &#8216;wdAutoFitFixed = 0 wdAutoFitContent = 1 wdAutoFitWindow = 2<br>With .Tables(.Tables.Count)<br>.Range.Cells(1).Range.Text = &#8220;\u59d3\u540d&#8221;<br>.Range.Cells(2).Range.Text = &#8220;\u6027\u522b&#8221;<br>.Range.Cells(3).Range.Text = &#8220;\u5e74\u9f84&#8221;<br>.Range.Cells(4).Range.Text = &#8220;\u804c\u79f0&#8221;<br>.Range.Cells(5).Range.Text = &#8220;\u5f20\u4e09&#8221;<br>.Range.Cells(6).Range.Text = &#8220;\u7537&#8221;<br>.Range.Cells(7).Range.Text = &#8220;36&#8221;<br>.Range.Cells(8).Range.Text = &#8220;\u5de5\u7a0b\u5e08&#8221;<br>.Range.Cells(9).Range.Text = &#8220;\u674e\u56db&#8221;<br>.Range.Cells(10).Range.Text = &#8220;\u5973&#8221;<br>.Range.Cells(11).Range.Text = &#8220;28&#8221;<br>.Range.Cells(12).Range.Text = &#8220;\u9884\u7b97\u5458&#8221;<br>End With<br>End With<br>On Error GoTo 0<br>End Sub<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"945\" height=\"182\" src=\"https:\/\/www.wyrcad.com\/wp-content\/uploads\/2024\/06\/namelist.jpg\" alt=\"\" class=\"wp-image-734\" srcset=\"https:\/\/www.wyrcad.com\/wp-content\/uploads\/2024\/06\/namelist.jpg 945w, https:\/\/www.wyrcad.com\/wp-content\/uploads\/2024\/06\/namelist-300x58.jpg 300w, https:\/\/www.wyrcad.com\/wp-content\/uploads\/2024\/06\/namelist-768x148.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Dim oWord As ObjectCall BindWord(True) Dim oDocument As &hellip; <a href=\"https:\/\/www.wyrcad.com\/?p=711\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cMicrosoft Word \u751f\u6210\u8868\u683c\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[24,17],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-bianchengyuandi","tag-vb","tag-biancheng"],"_links":{"self":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=711"}],"version-history":[{"count":13,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":736,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/711\/revisions\/736"}],"wp:attachment":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}