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

excel vba ¥t¦s·sÀÉ word

excel vba ¥t¦s·sÀÉ word

¤p§Ì¨C¶g¤­·|±Æ©w¤U¶g¤½¥q¦æµ{¡A©Ò¥H¦³8¤u§@ªí¡A

²Ä¤@­Ó¬O(²Î­p)¡A«á­±¤À§O¬O(¶g¤@)~(¶g¤é)

¦p¦ó¨Ï¥ÎVBA°õ¦æ«á¡A¥O(¶g¤@)~(¶g¤é)¤À§O¥t¦s¦¨wordÀɦb®à­±¤W¡H

³Ì¦n¥i¥H¶¶«KÂ^¨ú¤U¶gªº¤é´Á·íÀɦW

¦p(0422¦æµ{)~(0428¦æµ{)¡A¦@7­ÓwordÀÉ

¹ï¤F¡A§Úªº(¶g¤@)~(¶g¤é)¬Oªí®æ

«ô°U¡I«ô°U¡I¡I¡I

¦^´_ 1# dennis
¥Î³Ìª½Ä±±o¼gªk¡A½Æ»s/¶K¤W/¦sÀÉ
  1. Sub ex()
  2. d = Date + 7 - Weekday(Date, 2) '¬P´Á¤éªº¤é´Á
  3. For i = 2 To Sheets.Count
  4. Sheets(i).UsedRange.Copy '­×§ï½Æ»s¦ì¸m
  5.   Set Wd = CreateObject("Word.Application")
  6.       Set Doc = Wd.Documents.Add
  7.       Wd.Selection.PasteExcelTable False, False, False
  8.       Doc.SaveAs "D:\" & Format(d + i - 1, "mmdd") & "¦æµ{.doc" '¦s¦¨WORDÀÉ
  9.       Wd.Quit
  10. Next
  11. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

«D±`·PÁª©¥D¡A³o¤j¤j´£¤É§Ú¤u§@ªº®Ä²v¡A¦Ó¥B¤]¤£¥²¾á¤ß·|½Æ»s¿ù»~¡A¯u¬O¤Ó·PÁ±z¤F¡I¡I

TOP

ª©¥D¡G¤£¦n·N«ä¡I·Q¦A½Ð±Ð¤@­Ó¤p°ÝÃD¡A
        ¦]§Ú­Ì¬O¨Ï¥Î¤½¥q¤º³¡ªººô¸ô¡Aµn¤J®É¬O¨Ì·Ó­Ó¤Hªº¨­¥÷ÃÒ¸¹½X¡A
        ¦pªG·Q±NÀx¦sªº¸ô®|§ï¦¨¡A¨Ï¥ÎªÌªº®à­±¡A¨º¸Ó¦p¦ó³]©w¡H
        §Ú¸Õ¹L±N ¡i"D:\" ¡j
        §ï¦¨¡i"C:\Documents and Settings\All Users\s123456789\®à­±" ¡j
        «o¤£·|ª½±µ¦s¦b®à­±¤W¡A¦Ó¬O­n¥Î·Æ¹«¤@¤U¤@¤UÂI¶i¥h¸ê®Æ§¨¡A
        ¨Ã¥B¥¦¬O¦s¦b¡i"C:\Documents and Settings\All Users\s123456789" ¡j
        ¤£¬O¡i"C:\Documents and Settings\All Users\s123456789\®à­±" ¡j¦n©_©Ç®@¡H¡I
        «ç»ò·|³o¼Ë¡H¡H¡H

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD