- ©«¤l
- 95
- ¥DÃD
- 29
- ºëµØ
- 0
- ¿n¤À
- 150
- ÂI¦W
- 0
- §@·~¨t²Î
- windows2003
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Kaoshiung
- µù¥U®É¶¡
- 2010-11-5
- ³Ì«áµn¿ý
- 2018-2-8
|
¦^´_ 7# Hsieh
·PÁª©¥Dªº«ü¥¿,¨ä¹ê³o´X¬qµ{¦¡¤]¬O¥ý«e½Ðª©¥D«ü¥¿«÷´ê¥X¨Óªº,¤p§Ì¤£¬O«ÜÀ´¨ä¤¤ªº·N«ä,è¤~ªºµ{¦¡¸Õrun¤F¤@¤U,¹Ï¤ù¤@ª½«Å|,debug«á,µo²{sheet(i)¨S¦³²Ö¥[,²{¤w¸gok,2003¦~ª©ªºexcel
picture,insert( ),µLªk©µ¥Î¦Ü2010¦~ª©,¤p§Ì²{¦b¤F¸Ñ¤F,¹ê¦b·PÁÂ!- Sub STARTGETSINF()
- Dim Fs As Object, E, i As Integer, P, ii As Integer
- Dim xlPath As String
- Dim myWb As Workbook
- Dim myFileName As String
- Cells.Clear
- ActiveWindow.Zoom = 75
- Rows("2:9999").EntireRow.AutoFit
- Columns("B:Y").ColumnWidth = 2
- With Application.FileDialog(msoFileDialogFolderPicker)
- .AllowMultiSelect = False
- .InitialFileName = "D:\Export\SINF\"
- .Show
- If .SelectedItems.Count = 0 Then Exit Sub
- xlPath = .SelectedItems(1)
- End With
- With CreateObject("Scripting.FileSystemObject").GetFolder(xlPath)
- i = 1
- For Each E In .SubFolders
- If i > ActiveWorkbook.Sheets.Count Then
- Sheets.Add(, Sheets(Sheets.Count)).Name = E.Name
- Else
- Sheets(i).Name = E.Name
- End If
- ii = 2
- For Each P In E.Files
- If InStr(UCase(P.Name), ".JPG") Then
- ActiveWindow.Zoom = 75
-
- With Sheets(i).Cells(ii, 2).Select '³]©w¹Ï¤ùÄæ¦ì¤j¤p
- With Selection
- .RowHeight = 60
- .ColumnWidth = 9.5
- .WrapText = True
- End With
-
- t = Cells(ii, 2).Top + Cells(ii, 2).Height * 0.1 '¹Ï¤ù¤W¦ì¸m
- l = Cells(ii, 2).Left + Cells(ii, 2).Width * 0.1 '¹Ï¤ù¥ª¦ì¸m
- w = 50 '¹Ï¤ùÁY¤p50%¼e«×
- h = 50 '¹Ï¤ùÁY¤p50%°ª«×
- With Sheets(i).Shapes.AddPicture(P, True, True, l, t, w, h) 'BÄæ´¡¤J¹Ï¤ù
- .Placement = xlMove '¹Ï¤ù¤j¤pÀHÀx¦s®æ¦ì¸m¦Ó§ïÅÜ
- With Sheets(i) 'AÄæ´¡¤J¹Ï¤ù¦WºÙ
- '.Cells(ii, 1) = P.Name '¹Ï¤ùÀɮצWºÙ
- .Cells(ii, 1) = P '¹Ï¤ùÀɮק¹¾ã¸ô®|
- End With
- End With
- End With
- ii = ii + 1 '¤@¦¸¸õªºÄæ¦ì¼Æ
- End If
- Next
- [b][color=Red]i = i + 1[/color][/b] Next
- End With
-
- End Sub
½Æ»s¥N½X |
|