½Ð°Ý¥ÎVBA°õ¦æWORD¦X¨Ö¦C¦L¤Î¨äÀ³¥Î
- ©«¤l
- 230
- ¥DÃD
- 75
- ºëµØ
- 2
- ¿n¤À
- 337
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2000, 2019
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ¿¤
- µù¥U®É¶¡
- 2013-7-18
- ³Ì«áµn¿ý
- 2025-1-20
|
¥»©«³Ì«á¥Ñ linyancheng ©ó 2020-4-1 14:24 ½s¿è
¦^´_ 1# iceandy6150
¦bExcel¤¤¡G
Shell "rundll32.exe url.dll,FileProtocolHandler " & ThisWorkbook.Path & "\¡³¡³¡³¡³¡³.doc", 1 '¡u¡³¡³¡³¡³¡³.doc¡v§ï¦¨WordÀɦW¡C°²³]WordÀɦb¦P¤@¸ê®Æ§¨¤¤¡C
¦bWord¤¤¡G
¦´Áª©¥»¬O¬Û¹ï¸ô®|¡AOffice 2007¥H«á¬Oµ´¹ï¸ô®|¡C
¬°ÁקK³Â·Ð¡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 |
|
Word§e²{·¥PªºÀRºA¤§¬ü¡AExcel®i²{·¥Pªº°ÊºA¤§¬ü¡C
|
|
|
|
|