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

½Ð±Ð¦³ÃöEXCELÀx¦s®æ¤º¸ê®Æ³sµ²¦ÜWORD

½Ð±Ð¦³ÃöEXCELÀx¦s®æ¤º¸ê®Æ³sµ²¦ÜWORD

¥»©«³Ì«á¥Ñ ianlcc ©ó 2010-7-7 11:44 ½s¿è

§Ú¦³KEY¤@­ÓEXCELªº¤å¦r¡]¦pªþ¥ó¡G1JPG¡^¡AµM«á§Ú·Q­n§â³o­ÓEXCEL¤å¦r¤ºªº¸ê®Æ³sµ²¦ÜWORDÀɤºªºªí®æ¤º¡]¦pªþ¥ó¡G2.JPG¡^
Ä´¦p¡G
1.XLS¡GCÀx¦s®æ³sµ²¨ì2.DOC²Ä¤TÄæ
1.XLS¡GD¡®EÀx¦s®æ³sµ²¨ì2.DOC²Ä¤GÄæ
1.XLS¡GFÀx¦s®æ³sµ²¨ì2.DOC²Ä¤@Äæ
½Ð°Ý¦³¿ìªk°µ³o¤è­±ªº³sµ²¶Ü¡H
ÁÂÁ½Ыü¾É¡A·P®¦¡I

1.jpg (147.64 KB)

1.jpg

2.jpg (142.27 KB)

2.jpg

¦pªG¥Î³sµ²Àɮפ覡®£©È¹F¤£¨ì¼Ó¥D­n¨D
¸ÑÀ£ÁY¨ì¹q¸£«á°õ¦æexcelÀɮתí®æ­×§ï«á¦sÀÉÃö³¬
¦b¥h¶}±ÒwordÀɬݪí®æ¤º®e¬O§_¸òµÛ§ïÅܤF ExToWd.rar (10.51 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

TO:Hsieh¤j¤j
±z¦n¡AÁÂÁ±zªº«ü¾É¤ÎÀ°¦£¡]¯uªº¬OÀ°¤F¤@­Ó¤j¦£¡A·P®¦¡^
¤£¹L¡A¦A¦V±z½Ð±Ð´X­Ó°ÝÃD¡G
¤@¡B¦pªG§Ú­n«ü©wWORDÀɪºÀɦWªº¸Ü¡A¬O§_¬O¨ì¡u   Set Doc = .Documents.Open(ThisWorkbook.Path & "\Ãþ§O.doc")¡v¡A±N\Ãþ§O.doc­×§ï¦¨¦Û¤v«ü©wªºÀɦW©O¡H
¤G¡B¥t¥~¡A°²³]¦Û¤vªºEXCELÀɸ̦³SHEET1¡BSHEET2¡BSHEET3¡K¦@¦³¤T­Óªº¸Ü¡A»Ý­n¦bVBA¤¤«ü©w§Ú­n³sµ²ªº¬O­þ¤@­ÓSHEET¤ºªº¸ê®Æ¶Ü¡H
¡ô½Ð±Ð³o¨Ç°ÝÃD¡A½Ð¦h¦h«ü±Ð¡AÁÂÁ±z¡I

TOP

³o¬O·íµMªº£«
¨Ó·½¸ò¥Ø¼Ð³£­n«ü©w²M·¡ªº
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¨º½Ð±Ð¤@¤U¡A°ÝÃD¤G¤¤¡A§Ú¦pªG­n«ü©wSHEET2ªº¸Ü¡A­n«ç»ò­×§ï©O¡H
·Ð½Ð«ü¾É¤@¤U¡AÁÂÁ±z¡I

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-7-9 00:08 ½s¿è

¦^´_ 5# ianlcc
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2. '½Ð¥ý³]©w¤Þ¥Î¶µ¥ØMicrsoft Word 10.0 ObjectLibrary
  3. Dim Ar()
  4. Dim Wd As Word.Application, Doc As Document
  5. Application.ScreenUpdating = False
  6. Set Wd = CreateObject("Word.Application")
  7. With Sheet2
  8. For i = 1 To .[E65536].End(xlUp).Row
  9.    ReDim Preserve Ar(s)
  10.    Ar(s) = Array(.Cells(i, 5).Value, .Cells(i, 4).Value, .Cells(i, 3).Value)
  11.    s = s + 1
  12. Next
  13. End With
  14. With Wd
  15.    Set Doc = .Documents.Open(ThisWorkbook.Path & "\Ãþ§O.doc") 'docÀɦW¦Û¦æ§ó§ï
  16.    With Doc.Tables(1) '¥²¶·¦s¦bªí®æ
  17.    r = s
  18.    Do Until .Rows.Count <= s
  19.       .Rows(r).Delete
  20.       r = r - 1
  21.    Loop
  22.    
  23.       For i = 0 To UBound(Ar)
  24.       If i = .Rows.Count Then .Rows.Add
  25.          For j = 0 To 2
  26.             .Cell(i + 1, j + 1).Range.Text = Ar(i)(j)
  27.          Next
  28.         Next
  29.    End With
  30. Doc.Save
  31.    .Quit
  32. End With
  33. Application.ScreenUpdating = True
  34. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

TO¡GHsieh
·PÁ±zªº¨ó§U¡A¦A¦¸ªºÁÂÁ±z¡I
TO¡G¦Ñ®L
ÁÂÁ±zªº«ü¾É¡A§Ú¤S¦h¾Ç¨ì¤@©Û¤F¡K

TOP

¦^´_ 7# ¦Ñ®L
®¤¤p§Ì¾q¶wµLª¾¹ê¦bµLªk¬}±x®L¥S§Þ¥©
¸Ó¦p¦ó¦bexcel¸òword¤§¶¡
´Nºâ¥Hie¶}±Ò­nÅý2Àɸê®ÆÄæ¦ì¤¬´«¨Ã¥i¦P¨B§ó·s¸ê®Æ
¤p§Ì¸ÕµÛ¦bword¥H´¡¤Jª«¥ó¹F¨ì2Àɯà³sµ²
¦ý¬OÄæ¦ì¼Æ¶q¤ÎÄæ¦ì¶¶§Ç³£±N¬O¦P¼Ëªº
ÁٽЮL¥S«ü¾É,±zªº¤èªk¸Ó«ç¼Ë¹F¦¨excel¸òword¤¬³s
¨Ã¥i¨Ïword¥u¦³excelªº³¡¥÷¸ê®Æ,¦Ó«D¥þªí®æ¸ê®Æ
Åý«á½ú­Ì¾Ç²ß
ÁÂÁÂ!
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 10# ¦Ñ®L
¨þ!¦Ñ®L¥S§Úª¾¹D³o´N¬O¥ÎIE°µ¾Þ§@¤¶­±¨Ó¾Þ§@¦UÃþ«¬ÀÉ®×
¦Ó¥B¥iª½±µ¦sÀÉ
±z¦³ÂI»~¸Ñ¤p§Ìªº·N«ä¤F
­«ÂI¦b©óword¸òexcelªº®æ¦¡¨Ã¤£¤@¼Ë
¦Ó¥B¥u¬O­n³¡¥÷excel¸ê®Æ¶Çµ¹wordªºªí®æ
½Ð°Ý¦³¤°»ò¦n¤èªk¿ì¨ì©O?
ÁٽЫüÂI°g¬z
ÁÂÁÂ!
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 13# ¦Ñ®L


   ³o¼ËÁA¸Ñ¤F©Ò¥H¥²¶·¤À§¤2¦¸§@·~¤~¯àÂ^¨ú³¡¤Àªí®æ
§Ú´£¨Ñ¤@­ÓOLE¤âªk¥t¤@­Ó°µªk
´¡¤J/ª«¥ó
´¡¤J­n³sµ²ªºEXCELÀÉ®×
­n¦bWORD­×§ïEXCEL©ÎEXCEL­×§ï«á¦AWORD§ó·s³sµ²³£¦æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD