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

[µo°Ý] §R°£¯S©wª«¥ó

[µo°Ý] §R°£¯S©wª«¥ó

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

¤p§Ì§Ú¥Î¤F¤@¨Ç»yªk´¡¤Jª«¥ó(.pdf)¨ìÀx¦s®æ¤¤
  1.     DisplayAsIcon:=True, IconFileName:= _
  2.                     "C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
  3.                     IconIndex:=0, IconLabel:=icon_name1).Select
½Æ»s¥N½X
§Ú²{¦b·Q³]­ÓresetÁä

Åý©Ò¦³ªº.pdfÀɤ@¦¸§R°£±¼

½Ð°Ý³o»yªk¸Ó«ç»ò¼¶¼g©O???

¤@ª½¸Õ¤£¥X¨Ó
§Ú¥Î¤FActiveSheet.OLEObjects.delete
µ²ªG¥þ³¡ª«¥ó³£§R¤FXDD

½Ð°Ý¸Ó¦p¦ó«ü©w¥u§R.pdfªºÀÉ®×??

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

¦^´_ 1# li_hsien


­Y¬O¿ï¨úÀx¦s®æ§R°£ªº¸ÜÀ³¸Ó¬O
  1.     ActiveSheet.Select
  2.     Selection.ClearContents
½Æ»s¥N½X
ªì·sªÌ~«ü±ÐÅo~

TOP

¦^´_ 2# wl02353427

ÁÂÁÂwªº¦^ÂР :  )

¤£¹L§Ú¬O­n§R±¼Àx¦s®æ¤¤ªºª«¥ó

¦Ó«DÀx¦s®æªº¤º®e

¦¹°µªkÀ³¸Ó¥u¯à²M±¼Àx¦s®æªº¤º®e¦Ó¤w
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

  1. Sub ex()
  2. Dim Ob As OLEObject
  3. With ¤u§@ªí1
  4. For Each Ob In .OLEObjects
  5.    If Ob.OLEType = xlOLELink Then
  6.       ar = Split(Ob.SourceName, ".")
  7.       If ar(UBound(ar)) = "pdf!'" Then Ob.Delete
  8.    End If
  9. Next
  10. End With
  11. End Sub
½Æ»s¥N½X
¦^´_ 3# li_hsien
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2013-12-16 19:05): ½Ð¤W¶ÇÀÉ®×

¦^´_ 4# Hsieh


½Ð°ÝªO¤j

§Ú If Ob.OLEType = xlOLELink Then ³o¦æ

¤@ª½§PÂ_¤£¶i¥h

¤£ª¾­ì¦]¥X¦b­þ¸Ì????
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 4# Hsieh

§Ú²{¦b¤~µo²{³qª¾

ªþÀɪº¦³ÂI±ß

Attach File.zip (36.33 KB)

¦bAÄæ¦ì¶ñ¤W½s¸¹

³Ì«á«ö¤U«ö¶s

·|§âPDFÀɧì¶i¨Ó¨ìBÄæ

§Ú·Q³]­ÓRESET«ö¶s

Åý©ÒªþªºPDFÀÉ¥i¥H²M°£±¼

³Â·Ð¤j¤jÀ°§Ú¬Ý¬Ý

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

TOP

¦^´_ 7# nissin



§Úªº§@ªk¬O¦bAÄæ¿é¤J©Ò­nªºPDFÀɦW

«ö¤U«ö¶s

¦b¯S©w¸ô®|·j´MPDFÀÉ

©ñ¨ìBÄæ¦ì¸Ì­±

¥H¤U¬O§ÚªþÀɪº¤è¦¡
  1. Private Sub Attach_File_Click()

  2.     For i = 2 To Range("A65536").End(xlUp).Row
  3.    
  4.     Range("B" & i).Select
  5.     icon_name = Range("A" & i)
  6.             
  7.     Path = "C:\Documents and Settings\hsien.li\®à­±\"
  8.     Filename = Path & icon_name & ".pdf"
  9.             
  10.         '³ø§i¦s§_
  11.         If Dir(Filename) <> "" Then
  12.             ActiveSheet.OLEObjects.Add(Filename:=Filename, Link:=False, Link:=False, _
  13.                 DisplayAsIcon:=True, IconFileName:= _
  14.                 "C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
  15.                 IconIndex:=0, IconLabel:=icon_name).Select
  16.         Else
  17.             Range("B" & i) = "§ä¤£¨ì" & icon_name & "ÀÉ®×"
  18.         End If
  19.         
  20.         Debug.Print icon_name
  21.       
  22.     Next
  23.    
  24.     MsgBox "¾ã²z§¹¦¨"

  25. End Sub
½Æ»s¥N½X
³Â·Ð¤j¤j À°§Ú¬Ý¬Ý

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

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-12-19 09:56 ½s¿è

¦^´_ 6# li_hsien
  1. Sub AddObject() '¥[¤JPDFÀɮת«¥ó
  2. Dim A As Range, f$, fd$, fn$
  3. Application.ScreenUpdating = False
  4. For Each A In Range([A2], [A2].End(xlDown))
  5. fd = ThisWorkbook.Path & "\"
  6. f = Dir(fd & A & ".pdf")
  7. fn = fd & f
  8. MyIcon = "C:\Windows\Installer\{AC76BA86-7AD7-1028-7B44-AA1000000001}\PDFFile_8.ico" '§Úªº¹Ï¥ÜÀɦì¸m
  9. 'MyIcon = "C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico"'§Aªº¹Ï¥ÜÀɦì¸m
  10. A.Offset(, 1) = ""
  11. If f <> "" Then
  12.     With ActiveSheet.OLEObjects.Add(Filename:= _
  13.         fn, Link:=False, DisplayAsIcon _
  14.         :=True, IconFileName:= _
  15.         MyIcon, _
  16.         IconIndex:=0, IconLabel:=fn)
  17.         .Left = A.Offset(, 1).Left
  18.         .Top = A.Top
  19.         End With
  20.         Else
  21.         A.Offset(, 1) = "§ä¤£¨ìÀÉ®×" & A & ".pdf"
  22. End If
  23. Next
  24. End Sub
  25. Sub DeletObject() '§R°£PDF
  26. Dim Ob As OLEObject
  27. For Each Ob In ActiveSheet.OLEObjects
  28.    If Ob.progID = "AcroExch.Document.7" Then Ob.Delete
  29. Next
  30. MsgBox "¾ã²z§¹¦¨"
  31. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh

ÁÂÁªO¤j

¥i¥H§R°£¤F

·Q½Ð°Ý¤@¤U

If Ob.progID = "AcroExch.Document.7"
¬O§äPDFÀɪº·N«ä¶Ü???
.progID¥D­n¬O«ü¤°»ò§r


²¼ä¦³¤Oªº»yªk
ÁÂÁ  :  )
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD