- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 102
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-5-3
|
¦^´_ 5# cmo140497
§Aªº¥Øªº¬°¦ó§Ú¤£ª¾¹D¡A¦ýn·s¼W¹Ï¤ù¥un§ï¦¨¥H¤U¬yµ{§Y¥i- 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
- Next
- End With
-
- End Sub
½Æ»s¥N½X |
|