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

[µo°Ý] ½Ð±ÐÃö©ó¦X¨Ö¦C¦L°ÝÃD

[µo°Ý] ½Ð±ÐÃö©ó¦X¨Ö¦C¦L°ÝÃD

ªþ¥[ÀɬOºô¤Í¨Ó«H°Ýªº°ÝÃD
¥L·Q±NExcel¤¤ªº¸ê®Æ,³z¹L¦X¨Ö¦C¦L¦ÜWordªí¤¤
¥Ø«e¦b°õ¦æ¤W·|²£¥Í¸ê®Æ¿òº|²{¶H
©Ò¥H§Ú«Øij¥L§ï¥H¤@­¶¤@µ§,¦A¶i¦æ³B²z
¤£ª¾¦U¦ì¦³¨S¦³¸û¦nªº³B²z¤è¦¡
ÁÂÁ¡I

991011.zip (15.78 KB)

°¶Ôйq¤l®Ñ,Åwªï§K¶O¤U¸ü°Ñ¦Ò
http://www.twbts.com/ebook/?subject=office
http://www.twbts.com/ebook/?subject=soft
°¶ÔÐÂîѮw---https://www.facebook.com/groups/669579416484096/
¦³¤@®a¬a¥J©±---https://www.facebook.com/sadodona

¦^´_ 1# °¶ÔÐ
Ãö©óword ªºvba §Ú¤£¼ô¦b¦¹ÄmÁà¤F,¦p¦³¯Ê¥¢©|½Ð«ü±Ð word¤º¦³¤@Ä欰¬Û¤ù©|»Ý°ª¤â«ü¤Þ  

ªþ¥óªºxls»Pwordªº¸ê®Æ¤£¤@­P ½Ð¦Û¦æ­×¥¿  
  1. Sub Ex()
  2.     Dim MyXls As Object, Rng As Object, First As String, ii%, i%, T%, C%
  3.     Set MyXls = CreateObject("EXCEL.APPLICATION")
  4.     First = "E2"                                                'ªþÀÉ991011.xlsÀɮ׸ê®Æ¤¤²Ä¤@µ§¸ê®Æªº¦ì¸m
  5.     With MyXls
  6.         .Visible = True
  7.         .WORKBOOKS.Open ("D:\TEST\991011.xls")                  '¥´¶} xls¸ê®ÆÀÉ
  8.         Set Rng = .WORKBOOKS(1).SHEETS(1).Range(First).End(2)
  9.         Set Rng = Rng.End(4)
  10.         Set Rng = .WORKBOOKS(1).SHEETS(1).Range(First, Rng)     '¨ú±o¸ê®Æ
  11.     End With
  12.     Documents.Open "d:\test\991011.doc"                         ' ¥´¶}«ü©wªºword
  13.     If Rng.Rows.Count > 5 Then                                  ' ½Æ»sªí®æ
  14.         For i = 6 To Rng.Rows.Count Step 5                      'Word¨C¤@¸ê®Æªí®æ¼Æ=5
  15.             Set myRange = ActiveDocument.Range(Start:=ActiveDocument.Range.End - 1, End:=ActiveDocument.Range.End)
  16.             With ActiveDocument.Tables(1)
  17.                 .Select
  18.                 Selection.Copy
  19.             End With
  20.             myRange.Select
  21.             Selection.TypeParagraph
  22.             Selection.TypeParagraph
  23.             Selection.Paste
  24.         Next
  25.     End If
  26.     C = 1:    T = 1
  27.     For i = 1 To Rng.Rows.Count   '''''''''''''''½Æ»sxls¸ê®Æ ¨ì Wordªí®æ
  28.         For ii = 1 To Rng.Columns.Count
  29.             ActiveDocument.Tables(T).Cell(ii + IIf(ii <= 10, 1, 2), 1 + IIf(ii < 10, C, C + 1)).Range = Rng(i, ii)
  30.         Next
  31.         If i Mod 5 <> 0 Then
  32.             C = C + 1
  33.         Else
  34.             T = Int(i / 5) + 1:    C = 1
  35.        End If
  36.     Next     '''''''''''''''½Æ»sxls¸ê®Æ ¨ì Wordªí®æ   
  37.     MyXls.Quit                                 'Ãö³¬xls ÀÉ®×   
  38.     'ActiveDocument.PrintOut                   '¦L¦CÀÉ®×
  39.     'ActiveDocument.SaveAs "d:\test\???doc"    '¦sÀÉ
  40.     Application.Quit                           'Ãö³¬ Word
  41. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE

ÁÂÁÂ[GBKEE]ª©¥D
§Ú¤£À´VBA
¤£¹L¥Ñ±z¼gªºVBA¬Ý¨Ó,¤£¬O¥ÑE2¶}©l½Æ»s¶Ü?
§Ú±NExcelÄæ¦ìªº¶¶§Ç½Õ¦¨¸òWordªº¤@¼Ë,¥i¬O«ç»ò¦ì¸mÁÙ¬O·|¿ù¶Ã?
­Y¦³»~¸Ñ,Áٽбz¸Ñ»¡¤@¤U,ÁÂÁÂ!

Ãö©ó´¡¤J¥~³¡¹ÏÀÉ,§Ú¤Wºô¬d¤F¤@¤U
¤£¹L«ç»ò®M¥Î¶i¨Ó,§Ú´N¤£¦æ¤F
  1. Sub picture()
  2. ActiveDocument.Tables(1).Cell(2, 1).Select    Selection.InlineShapes.AddPicture FileName:="D:\991011.jpg"
  3. End Sub
½Æ»s¥N½X
°¶Ôйq¤l®Ñ,Åwªï§K¶O¤U¸ü°Ñ¦Ò
http://www.twbts.com/ebook/?subject=office
http://www.twbts.com/ebook/?subject=soft
°¶ÔÐÂîѮw---https://www.facebook.com/groups/669579416484096/
¦³¤@®a¬a¥J©±---https://www.facebook.com/sadodona

TOP

¨£ªþ¥ó¡A¦p¦bexcel¤º°µ¬O§_¯à 991011.rar (10.47 KB) ±µ¨ü¡H

TOP

¦^´_ 4# oobird

³o¬Oºô¤Í°Ý§Úªº°ÝÃD(Å¥»¡¬O°ê¤¤¥Íªº§@·~ @@)
§Ú¤w¸gµ¹¹ï¤è"¤£¬O«Ü¦³®Ä²v"ªº¸Ñ¨M¤èªk¤F,´£¥X¨Ó¥u¬O§Ú­Ó¤H·Qª¾¹D¦³¨S¦³¤°»ò¦n¤èªk¦Ó¤w
§Ú¬Oı±o¥u­n¯à°÷¸Ñ¨M°ÝÃD,¨S¦³¤°»ò¥i¤£¥i¥H,²¦³º¸Ñµª¤£¥u¤@ºØ
Åwªï[oobird]ª©¥D´£¨Ñ¥i¯àªº¸Ñ¨M¤èªk
ÁÂÁÂ!
°¶Ôйq¤l®Ñ,Åwªï§K¶O¤U¸ü°Ñ¦Ò
http://www.twbts.com/ebook/?subject=office
http://www.twbts.com/ebook/?subject=soft
°¶ÔÐÂîѮw---https://www.facebook.com/groups/669579416484096/
¦³¤@®a¬a¥J©±---https://www.facebook.com/sadodona

TOP

¦]¬°³æ¯Â¥Îexcel¾Þ§@¡A¥u¬O®M®M¦ì¸m´N¤è«K¦h¤F¡C
­Y¬O¾Ç¥Í§@·~À³¸Ó¤£¯à§@³o¼Ëªº§ó§ï¡C

TOP

¦^´_ 6# oobird

§@·~¦n´X­Ó¬P´Á«e´N¥æ¤F
¦pªG¥i¥H,ÁÙ¬O§Æ±æ[oobird]ª©¥D´£¨Ñ¦bExcelªº§@ªk
ÁÂÁÂ!
°¶Ôйq¤l®Ñ,Åwªï§K¶O¤U¸ü°Ñ¦Ò
http://www.twbts.com/ebook/?subject=office
http://www.twbts.com/ebook/?subject=soft
°¶ÔÐÂîѮw---https://www.facebook.com/groups/669579416484096/
¦³¤@®a¬a¥J©±---https://www.facebook.com/sadodona

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-10-13 06:38 ½s¿è
§Ú±NExcelÄæ¦ìªº¶¶§Ç½Õ¦¨¸òWordªº¤@¼Ë,¥i¬O«ç»ò¦ì¸mÁÙ¬O·|¿ù¶Ã?
°¶ÔÐ µoªí©ó 2010-10-12 22:38

Word¸Ì¦³¤@¨ÇlÄæ¦ì ¦bExcelÄæ¦ì¤¤¨Ã¨S¦³¥X²{ ½Ð¦bExcelÀɮפ¤±N¥¦¸É»ô
¨Ò¦pExcelÄæ¦ì¤¤¨S¦³¬Û¤ùÄæ,­n¸É¤W¬Û¤ùÄæ,¸ê®Æ¤º®e¬OªÅ¥Õ¤]¨S¦³Ãö«Y.
½Ð¦A¸Õ¸Õ¬Ý

TOP

¥»©«³Ì«á¥Ñ oobird ©ó 2010-10-13 11:43 ½s¿è
¦^´_  oobird

§@·~¦n´X­Ó¬P´Á«e´N¥æ¤F
¦pªG¥i¥H,ÁÙ¬O§Æ±æ[oobird]ª©¥D´£¨Ñ¦bExcelªº§@ªk
ÁÂÁÂ!
°¶ÔÐ µoªí©ó 2010-10-13 00:24

³o¬O¨ç¼Æª©ªº¡C·í³Ì«á­¶¤H¼Æ¤£º¡®É¥i§â¦h¾lªº¬Û¤ù³]¬°¤£¦C¦L¡I

991011.rar (116.96 KB)

TOP

¤p§Ì¸Õ¤F¡A¦pªG§âwordªºªí®æ¤è¦V§ï¬°¾î¦¡ªº¸Ü¡A´N¥i¥H²³æªº¸Ñ¨M
ª½¦¡ªº¸Ü´N·|¦³°ÝÃD¡C
¤p§Ì¬Oexcelµ{¦¡ªì¾ÇªÌ¡A½Ð¦h¦h«ü±Ð

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD