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

[­ì³Ð] ¦Û°Ê¤Æ¦X¨Ö¦C¦L§Þ³N

[­ì³Ð] ¦Û°Ê¤Æ¦X¨Ö¦C¦L§Þ³N

Word¦X¨ÖExcel¦C¦L¡A¦­´Áª©¥»¬O±Ä¬Û¹ï¸ô®|¡AOffice 2007¥H«á¬O±Äµ´¹ï¸ô®|¡C
¬°ÁקK¦]µ´¹ï¸ô®|¦Ó¥¢¥hExcel¸ê®Æ³sµ²ªº³Â·Ð¡A¥i¦b§¹¦¨½s¿èWord¥D¤å¥ó«á¡A±N¨äÁ٭쬰¼Ð·ÇªºWord¤å¥ó¡AµM«á¦bThisDocument¤¤¥[¤J¥H¤U¥N½X¡G

Private Sub Document_Open()

    On Error Resume Next
   
    With ThisDocument.MailMerge
        .MainDocumentType = wdCatalog '¥D¤å¥ó«¬¦¡³]¬°«¬¿ý(¥Ø¿ý)¡A¤]¥i³]¬°«H«ÊwdEnvelopes¡B«H¥ówdFormLetters©Î¼ÐÅÒwdMailingLabels¡C
        .OpenDataSource Name:=ThisDocument.Path & "\¡³¡³¡³¡³¡³.xls" '¡u¡³¡³¡³¡³¡³.xls¡v§ï¦¨¸ê®Æ¨Ó·½ÀɦW¡C°²³]¨Ó·½Àɦb¦P¤@¸ê®Æ§¨¤¤¡C
        
        '.Destination = wdSendToNewDocument
        '.SuppressBlankLines = True
        
        'With .DataSource
            '.FirstRecord = wdDefaultFirstRecord
            '.LastRecord = wdDefaultLastRecord
        'End With
        
        '.Execute True
    End With
   
    'ThisDocument.Close wdDoNotSaveChanges

End Sub

¤ë¾ä³]­p¨t²Îv5.0

VBA·½½X¤½¶}
¨ç¼Æ¤½¦¡¤½¶}
¥\¯àÅܼƤ½¶}

¤ë¾ä³]­p¨t²Îv5.0.zip (608.55 KB)

1

µû¤À¤H¼Æ

Word§e²{·¥­PªºÀRºA¤§¬ü¡AExcel®i²{·¥­Pªº°ÊºA¤§¬ü¡C

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD