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

[µo°Ý] ¥ÎEXCEL¶×¶°¦UÀÉ®×

[µo°Ý] ¥ÎEXCEL¶×¶°¦UÀÉ®×

½Ð°Ý¦U¦ì¤j¤j

¥D­n¬O¤£ª¾³o¬O§_¥i¦æ?

¤W¨Ó¸ß°Ý¤@¤U


¤p§Ì·Q¥Î¤@­ÓEXCEL¿é¤JÀɮצWºÙ
(ªþÀɬO.pdf)

´N¯à±N²Å¦X³o¨ÇÀɦWªºpdfÀɶ׶°°_¨Ó¡A©ñ¦b¦P¤@­Ó¸ê®Æ§¨¸Ì


EX:
¦³­Ó¸ê®Æ§¨F¸Ì­±¥þ³¡³£¬OpdfÀɪº¸ê®Æ§¨

§Ú¥u­n¦bEXCEL¿é¤JÀɦWAAA¡BBBB¡BCCC

´N¯à±NF¸ê®Æ§¨¸ÌÀɦW¬°AAA¡BBBB¡BCCCªºÀɮ׿ï¨ú°_¨Ó¥t¥~©ñ¦b¦P¤@­Ó¸ê®Æ§¨¸Ì


¤£½T©w¬O§_¶W¥XEXCELªº¯à¤O½d³ò

¤p§Ì·Q°Ý°Ý¥i¦æ©Ê  

ÁÂÁ¦U¦ì¤j¤j  :  )

¦^´_ 1# li_hsien


    À³¸Ó¬O¥i¥Hªº¡A¥u¬O¬°¤°»ò§Ú¤@ª½¥¢±Ñ...:'(

¦³«e½ú¥i¥HÀ°¦£¤@¤U¶Ü ....
example.rar (17.94 KB)

Dim i As Long
    With Worksheets("¤u§@ªí1")
        For i = 1 To 4
            
            On Error Resume Next
            .Cells(i, 1).Hyperlinks.Delete
            On Error GoTo 0
            
            .Hyperlinks.Add Anchor:=.Cells(i, 1), Address:="EXAMPLE" & "\" & Left(Cells(i).Text, 11), TextToDisplay:=Left(.Cells(i, 1).Text, 1)

¬°¤°»ò«á­±>>>Left(Cells(i).Text, 11)<<<³£¨S¦³Åã¥Ü...
ªì·sªÌ~«ü±ÐÅo~

TOP

¦^´_ 1# li_hsien
¼Ó¥DÀ³¸Ó¬O·Q­n±N¬Y¨Ç«ü©wÀɦWªºÀɮײ¾°Ê¨ì¯S©w¥Ø¿ý¤º
°²³]ÀɦW(¤£¥[°ÆÀɦW)©ñ¸m©ó¤u§@ªíAÄæ
  1. Sub ex()
  2. Dim A As Range
  3. Set fds = CreateObject("Scripting.FileSystemObject")
  4. With Application.FileDialog(msoFileDialogFolderPicker)
  5. .Title = "¿ï¾ÜPDF­ì¥ý¸ê®Æ§¨"
  6. .Show
  7. ofd = .SelectedItems(1) & "\"
  8. End With
  9. With Application.FileDialog(msoFileDialogFolderPicker)
  10. .Title = "¿ï¾ÜPDF¥Øªº¸ê®Æ§¨"
  11. .Show
  12. fd = .SelectedItems(1) & "\"
  13. End With
  14. With ¤u§@ªí1 '¿é¤JÀɦWªº¤u§@ªí
  15.   For Each A In .Range(.[A1], .[A1].End(xlDown))
  16.     fs = Dir(ofd & A & ".pdf")
  17.     If fs <> "" Then fds.movefile ofd & fs, fd & fs '²¾°ÊÀÉ®×
  18.   Next
  19. End With
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# Hsieh

¬Oªº ³o¬O§Ú·Q­nªº  ¨þ¨þ

§Ú¤]·Q¨ì¸Ñ¨M¿ìªk
  1. Private Sub Add_Attachement_Click()

  2.     Dim path As String
  3.     Dim i As Integer, j As Integer
  4.         
  5.     path = ThisWorkbook.path + "\Report¾ã²z\"
  6.     i = 2
  7.     j = 2
  8.         
  9.     'On Error GoTo handlerr
  10.     On Error Resume Next
  11.    
  12.     While ActiveSheet.Cells(i, 1) <> ""
  13.         
  14.         
  15.         Call FileSystem.FileCopy _
  16.         (ThisWorkbook.path + "\Report\" & Cells(i, 1) & ".pdf" _
  17.         , path & Cells(i, 1) & ".pdf")
  18.         
  19.         If Err.Number = 53 Then
  20.             Cells(j, 3) = Cells(i, 1)
  21.             j = j + 1
  22.             Err.Number = ""
  23.         End If
  24.         
  25.         i = i + 1
  26.         
  27.     Wend

  28.     Exit Sub

  29. 'handlerr:
  30. '
  31. '    MsgBox Err.Number & vbCrLf & Err.Description

  32. End Sub
½Æ»s¥N½X
¤£¹L¸òªO¤jªº»yªk¬Û¤ñ ¬Û¶Z¬Æ»· «¢«¢

ªO¤j§Aªº¦n²`@@

§Ú¦A¨Ó¬ã¨s¤@¤U

ÁÂÁ  :  )
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 3# Hsieh

·Q½Ð°Ý¤@¤UªO¤j

fd = .SelectedItems(1) & "\"
³o­Ó¥Î³~¬O???

For Each A In .Range(.[A1], .[A1].End(xlDown))
³o­Ó¬O¶]AÄæ¸Ì­±©Ò¥HªºÀx¦s®æ§a?

fs = Dir(ofd & A & ".pdf")
If fs <> "" Then fds.movefile ofd & fs, fd & fs '²¾°ÊÀÉ®×
³o¨â¦æ§Ú¤]´N¬Ý¤£¤ÓÀ´¤F
¬O²¾°ÊÀɮתº¨î¦¡¼gªk¶Ü?
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_  Hsieh

·Q½Ð°Ý¤@¤UªO¤j

fd = .SelectedItems(1) & "\"
³o­Ó¥Î³~¬O???

For Each A In .Ran ...
li_hsien µoªí©ó 2013-12-9 15:31

fd = .SelectedItems(1) & "\"
·|±o¨ì¹ï¸Ü¤è¶ô¤¤©Ò¿ï¾Üªº¸ê®Æ§¨¥Ø¿ý¸ô®|¦r¦ê¡A¦]¬°¦¹¦r¦ê­n¦b«áÄò¨Ï¥Î®É·|³s±µÀɦW¡A©Ò¥H­n¥[¤W¤Ï±×½u
A¬O¹ï¤u§@ªí¤¤ªºÀx¦s®æ°µ°j°é¡A´N¬O¨ú±oÀɦW
fs = Dir(ofd & A & ".pdf")'§¹¾ãÀɦW­Y¤£¦s¦bfs±N·|±o¨ìªÅ¥Õ¦r¦ê¡A§_«hfs´N·|¶Ç¦^ÀɮצWºÙ(¦³¥[°ÆÀɦW)
If fs <> "" Then fds.movefile ofd & fs, fd & fs '§Q¥ÎFileSystemObjectªºMoveFile¤èªk²¾°ÊÀÉ®×(¬ÛÃö¥Îªk½Ð°Ñ¦ÒExcelªºCreateObject»¡©ú)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# Hsieh


    ÁÂÁªO¤jªº¸ÑÄÀ
   
   ¸g¹L´Xµf´ú¸Õ

   ²M·¡¦h¤F
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

        ÀR«ä¦Û¦b : Ãø¦æ¯à¦æ¡AÃø±Ë¯à±Ë¡AÃø¬°¯à¬°¡A¤~¯àª@µØ¦Û§Úªº¤H®æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD