ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

excel°}¦CÅܼÆÂà¦s¦Üword

excel°}¦CÅܼÆÂà¦s¦Üword

·Q½Ð±Ð¤@¤U
§Ú¦bexcel¸Ì§â¸ê®Æ¥á¶i¤@­Ó°}¦CÅܼÆ
¦bexcel¸Ì¤w¸g°õ¦æ§¹«á»Ý­n§Q¥Î¦P¼Ëªº¸ê®Æ¥h»s§@word¤å¥ó
­n«ç»ò¼Ë¤~¯à§â³o­Ó°}¦CÅܼƪ½±µÅýword¨Ï¥Î©O?
¥Ø«eªº°µªk¬O¥ý§â©Ò¦³ªº¸ê®Æ¶K¤Wword«á¦A¦bword¸Ì¥Î§Oªº°}¦CÅܼƧì¨ú
·Q°Ý¬Ý¬Ý¦³¨S¦³§Oªº¤è¦¡,ÁÂÁÂ~
Alyssa

¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

¦^´_ 1# Alyssa

   ±NSheet1.Range("A1:E5") ½d³ò¤ºªº¸ê®Æ ¶Ç°e¨ì¦b·s¶}ªºWORD¤å¥ó ¤§«á¦sÀÉ
  1. Sub Ex()
  2.     Dim Doc As Object, Rng As Range, r, c
  3.     Set Rng = Sheet1.Range("A1:E5")
  4.     Set Doc = CreateObject("WORD.APPLICATION")
  5.     With Doc
  6.         .Visible = True
  7.         .Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
  8.         .Documents(1).Tables.Add .ActiveDocument.Range, Rng.Rows.Count, Rng.Columns.Count
  9.         For r = 1 To Rng.Rows.Count
  10.             For c = 1 To Rng.Columns.Count
  11.             .Documents(1).Tables(1).cell(r, c) = Rng(r, c)
  12.             Next
  13.         Next
  14.         .Documents(1).SaveAs "d:\test\mydoc.doc"
  15.         .Quit
  16.     End With
  17.     Set Doc = Nothing
  18. End Sub
½Æ»s¥N½X

TOP

·PÁÂPD961Aªº¦^´_
¤£¹L§Ú¦bword¸Ì¨Ã¤£§¹¥þ¬Oªí®æ
©Ò¥H¦n¹³¤£¤Ó¾A¥Î¤£¹L¦h¤@­Ó°Ñ¦Ò¤è¦V¤]«Ü¦n

·PÁÂGBKEEªº¦^´_
³oÀ³¸Ó´N¬O§Ú»Ý­nªº
§Ú¦A¨Ó§V¤O¬ã¨s¤@¤U,¦]¬°­è±qexcel vba¨ìword vba
¦³ÂIÂण¹L¨Ó

¦A¦¸·PÁ¨â¦ìªº¦^´_,·P®¦~~~
Alyssa

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD