[發問]office 2010 word 範本不能使用Application.FileSearch
- 帖子
- 1
- 主題
- 1
- 精華
- 0
- 積分
- 7
- 點名
- 0
- 作業系統
- XP
- 軟體版本
- office 2010
- 閱讀權限
- 10
- 註冊時間
- 2011-11-23
- 最後登錄
- 2011-12-14
|
[發問]office 2010 word 範本不能使用Application.FileSearch
本帖最後由 awlk 於 2011-11-23 14:50 編輯
請個位大大,這原本是在office 2003 寫的巨集,目前因改成office 2010,所以不能跑了,不知道有那位好心的高手能幫幫小弟修改一下,感恩~~~~~~
Private Sub CommandButtonOK_Click()
Dim PicturePath$
Dim Msg, Style, Title, CR
CR = Chr$(13)
PicturePath$ = ChoosePathForm.TextBox1.Value
With Application.FileSearch
.NewSearch
.LookIn = PicturePath$
.SearchSubFolders = False
.FileName = "*.jpg"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
If .Execute() > 0 Then
Call Load_the_Pictures(PicturePath$)
Else
Msg = "There are no pictures in this directory:" _
+ CR + CR + PicturePath$ + CR + CR + _
"Please check the path again."
Style = vbOKOnly + vbQuestion
Title = "No files found"
MsgBox Msg, Style, Title
End If
End With
End Sub |
|
|
|
|
|
|