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

½Ð°ÝGBKEEª©¥D,³øªíÀÉ¥i¥H¦s°_,Â÷½u¦C¦L¶Ü?

½Ð°ÝGBKEEª©¥D,³øªíÀÉ¥i¥H¦s°_,Â÷½u¦C¦L¶Ü?

Äò[µ½¥Î¿ý»s¥¨¶°¥i¥H§ä¨ì«Ü¦h°ÝÃDªºµª®×,¥H¦Û°Ê¤À­¶¬°¨Ò]¥DÃD,
For i = 1 To Rng.Rows.Count  '©Ò­n¦L¦Cªº¤@³sÄòªº½d³òªºÁ`¦C¼Æ
      A = IIf(Rng.Rows.Count > i + R, R, Rng.Rows.Count - i + 1)
      .PageSetup.PrintArea = Rng(i, 1).Resize(A, C).Address '³]©w­n¦C¦L½d³òªº¦ì¸m¦r¦ê
      i = i + R - 1
      .PrintPreview '¦L¦C¹wÄý
Next i

½Ð°Ý³o¥i¥H¦s°_¨Ó¦¨¬°¤@­Ó³øªíÀÉÂ÷½u¦C¦L¶Ü?,¤£µM³øÀɦhªº®É­Ô½u¤W¦C¦L¦p¦ó¬O¦n?
V98

¬Ý¨Ó§A¬O­n¦s¦¨tifÀÉ
¨ì®É«á¦A¤@°_¦C¦L§a
­Y¬O¦p¦¹±N¦Lªí¾÷¿ï¾ÜMicrosoft Office Document Image Writer
´N¯à¦s¦¨¼v¹³ÀÉÀx¦s
­Y«D¦p¦¹¡A¬O·Q¸õ¹L¹wÄýª½±µ¦C¦L
´N¨ú®ø.PrintPreview
ª½±µ§ï¬°.PrintOut
¦Lªí¾÷·|ª½±µ¨Ì§Ç¦C¦L
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂHsieh,§Ú·|¦A¦³¤@­Ó¤è¦V¤F¦A§V¤O.
V98

TOP

¬Ý¨Ó§A¬O­n¦s¦¨tifÀÉ
Hsiehª©¥D,§Ú¤£¬O­n¦s¦¨tifÀÉ,©ÎªÌ¬O§Ú¹ïtifÀɪº»{ª¾¤£¨¬,tifÀɬO³o¼Ë©w¸qªº¶Ü?(Tag(ged) Image File Format),¤£ª¾¹Dª©¥DªºtifÀɬO«ü³o­Ó¶Ü?
¦ý¬O§Úªº·N«ä¤£¬O«ü³o­Ó,¥H«eªº³øªíÀÉ¥i¥H³o¼Ë¦sÀÉQB)
open "c:\print\print.txt" for output as #1
     print #1,"--------------------------------------------"
     print #1,"|¥N½X|°õ¦æµ²ªG|........................................|"
     print #1,"--------------------------------------------"
     print #1,"|001|24.3567|........................................|"
     print #1,"--------------------------------------------"
     print #1,"--------------------------------------------"
close #1

¦]¬°¦bWindows¤¤ªºASCIIÅܤF,¥H«eDOS©Ò¦³ªº®Ø½u³£¥i¥H¥HASCII²£¥Í,©Ò¥H¨Ò¤l¤¤ªº®Ø½u³£¬O¹ê½u,«Üº}«Gªº³øªíÀɬO¤@¦æ¤@¦æ³Q²£¥Í¥X¨Ó,¨Ã¥B¤@¦æ¦æªº¦s°_¨Ó,¸õ­¶¥u­n²£¥Í¤@­Ó¸õ­¶²Å¸¹´N¥i¥H¤F(CHR$(12)),VBA¬O¤u§@ªíªºÆ[©À,¨ä¹ê¤]¦³«Ü¦h¦n³B,¨Ò¦p:¥i¥H¹ï³æ¤@Àx¦s®æ§@Äݩʳ]©w,®Ø½u»s§@¤]«Ü²³æ,¦ý¬O¸õ­¶¦n¹³¤£¯àÀH¤ß©Ò¼¤,¦P¤@­¶¦pªG­n¦L»s¦h­Ó²M³æ,¥H«e¬O¥ý²£¥Í³\¦h¤pªí³æµM«á¼g¤@­Ó"Merge"µ{¦¡,¤@±i´N¥X¨Ó¤F,¦h»ò½ÆÂø³£¥i¥H,¸g±`³£¬O¥Î".txt"Àɦs°_¨Ó,µM«á¦bc:\¥´print xxx.txt,¨º©È¦³100­¶,³£³Q¦æ¦Cªí¾÷(Line printer)¥h¤@¦æ¤@¦æªº¦L¥X¨Ó,¬O¤£¬O«Ü¹³¦bÁ¿¥j,¦ý¬O´N¬O³o¼Ë¤l,§Úªº§xÂZ´N¬O(±qDOS Âà¨ì Windows)¦p¦ó»s§@³øªí?
V98

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-1 01:42 ½s¿è

¦^´_ 4# linshin1999


    §A·íµM¤]¥i¥H¦s¦¨TXTÀÉ
¥u¬OPrint #1«á­±±µªº´N¬O­n¿é¤Jªº¦r¦ê
©Ò¥H¡A´N¬OÀx¦s®æ¤º®e
¤]´N¬O»¡§A¥i¨Ï¥Î°j°é
´`¦C¨ú±oÀx¦s®æ¤º®e§Y¥i

³o¸Ì²³æ»¡¤@¤U¡AVBA¸òVB¨ä¹ê¬O¤@¼Ëªº³£¬O¥Hª«¥ó¬°¾É¦V
¥u¬OVBA¦]¬°¤w¸g³Ð«Ø¤F³\¦hÃþ§O¨Ñ¨Ï¥Î
©Ò¥H§A­n°w¹ï³o¨ÇÃþ§Oª«¥ó¥h¤F¸Ñ¨äÄÝ©Ê
§A­n¨ú±o³o¨Çª«¥óÄݩʤ~¯à¹B¥Î¨ìµ{¦¡¤¤
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

°ò¥»¥\¤ÒÁÙ¤£°÷·|¦A§V¤O,¦Aµ¹¤@¨Ç®É¶¡·|¨«±o¤U¥hªº,ÁÂÁÂHsiehª©¥Dªº¹ªÀy.
V98

TOP

Hsiehª©¥D§A¦n,§Ú·Q§Ú¬O³Q§x¦b¥H«eªº§@·~¤è¦¡¤¤¨Ó·QExcel,©Ò¥H¶]¤£¥X¨Ó.
¥H«e©Ò¦³ªºµ{¦¡¥i¥H¥Î¤@­ÓBatchÀÉ¥h¶],¶]§¹«á·|§¹¦¨©Ò¦³­nªº³øÀÉ,µM«á¦A¥Î§â¿ï¥Îªº³øªí¦L¥X¨Ó.
³o¼Ë°µ¦³¦n³B,§Ú¥i¥H¦b¤U¯Z«e§â­n°õ¦æªºµ{¦¡¥áµ¹¹q¸£¶],¦­¤W¨Ó¦A¦C¦L³øªí,µM«á¦AÄ~Äò¼gµ{¦¡,¨C¤Ñ³£¥i¥H­«½Æ³o¼Ëªº°Ê§@,¦ý¬OExcel¦n¹³¤£¦æ¥¦¥²¶·½u¤W§@·~,¥²¶·¥h«öXX¤~·|Â÷¶},¥H«e¶]§¹¤F·|¦³¤H¥hÃö¾÷,²{¦b¶]§¹¤FExcelÁÙ¦b,¹q¸£¥u¦n24¤p®É¶}¾÷,«Ü§xÂZ,©Ò¥H§Ú·|¤@ª½°Ý¥i¥H²£¥Í¥~³¡³øªí¶Ü?¥i¥HĶ¦¨¥i°õ¦æÀɶÜ?

¦n¹³Vba ¤£¯à²£¥Í¥i°õ¦æÀÉ, ¥Ø«e§Ú»{ª¾¬O³o¼Ëªº,¦ý¬O¦n¹³¥i¥H²£¥Í¥~³¡³øªí(¦pdf ©Î docÀÉ)¦ý¬OÁÙ¬O­n³z¹LWord ©Î Adobe Reader ¤~¥i¦C¦L¥X¨Ó,¦]¬°½u®Ø没¿ìªk¥ÎTxtÀÉÀx¦s,©Ò¥HExcelµLªk²£¥Í.txtªº³øªíÀÉ.

µù:¦¨¬°TXTÀɦ³¦n³B¥i¥H¦bDOS¼Ò¦¡¤U,¤U¦C¦L«ü¥O,¥i¥H¼g¦¨BatchÀɧ妸¦C¦L.
    ¥ÎWord ©Î Adobe Reader ³£¦³¦P¼Ëªº°ÝÃD,¥²¶·«ö XX ¤~¯àÂ÷¶},(§Ú­Ì¤½¥q¾a§Ú¤@­Ó¤Hª±¹q¸£,没¦³Â÷¶}¨t²Î´N没¦³¤H´±Ãö¹q¸£)©Ò¥H«Ü¶Ë¸£µ¬.

Hsiehª©¥D¯u¤£¦n·N«ä,»¡¤F¤@¤j°ï¥i¯à§AÁÙ¤£ª¾¹D§Ú¦bÁ¿¤°»ò.
V98

TOP

§A¥i¯à¬O·QÅýexcel²£¥Íªº¼Æ¾Ú¥áµ¹­ì¥»dosªºµ{¦¡¥h¦L³øªí
¦pªG¬O³o¼Ëªº¸Ü§A´N§âexcel¶×¥X¦¨¬°§Adosµ{¦¡¯à±µ¨üªº®æ¦¡

¦Ó§A´¿»¡¹L·í¦C¦L§¨¯È«á´N­n­«·s¨Ó¹L
³o¦bwindows¤¤À³¸Ó¬O¤£·|¦³¦¹±¡§Î
§A°µ§¹¦C¦L°Ê§@®É
excel©Ò­n¦C¦Lªº¸ê®Æ¤w¸g¦î¦C§¹¦¨®É
°£«D§A¬°¦Lªí¾÷°µ¨ú®ø¦C¦L
¤£µMªº¸Ü¥u­n¦Lªí¾÷¬O¶}±Òª¬ºA
§A±N©Ò¦³À³¥Îµ{¦¡Ãö³¬¤@¼Ë·|¦C¦L
§¨¯È©Î¼È°±¦C¦L«á
¥u­n­«·s±Ò°Ê¦Lªí¾÷´N¯à±µÄò¤U¥h
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsiehª©¥D:Excel¥i¥HµLªk¥á¥XDos¥i¥H±µ¨üªº®æ¦¡,¦]¬°Dos¥u±µ¨üASCII code,Excel²£¥ÍªºÀɮפ¤¦³³\¦h®Ø½u,³o¬OWin ©M Dosªº®t²§,¤]³\¬O¥H«eªºDosªº´Ý¯d¦L¶H,©Ò¥H¤@ª½°±¯d¦bDos¼Ò¦¡¤U¥h«ä¦Ò°ÝÃD,¦A±Ã¤ã¤@°}¤l·|¦n¤@ÂI,²{¦bÁÙ没¥h¸ÕµÛ±qExcel滙¥XÀÉ®×,§Ú·|¸Õ¸Õ¬Ý!¤]³\·|§ä¨ì§Ú­nªºµª®×.
V98

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD