- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# Alyssa
±NSheet1.Range("A1:E5") ½d³ò¤ºªº¸ê®Æ ¶Ç°e¨ì¦b·s¶}ªºWORD¤å¥ó ¤§«á¦sÀÉ- Sub Ex()
- Dim Doc As Object, Rng As Range, r, c
- Set Rng = Sheet1.Range("A1:E5")
- Set Doc = CreateObject("WORD.APPLICATION")
- With Doc
- .Visible = True
- .Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
- .Documents(1).Tables.Add .ActiveDocument.Range, Rng.Rows.Count, Rng.Columns.Count
- For r = 1 To Rng.Rows.Count
- For c = 1 To Rng.Columns.Count
- .Documents(1).Tables(1).cell(r, c) = Rng(r, c)
- Next
- Next
- .Documents(1).SaveAs "d:\test\mydoc.doc"
- .Quit
- End With
- Set Doc = Nothing
- End Sub
½Æ»s¥N½X |
|