请问:为什么在PPT中的VBA中用不了这句
我想在PPT中通过对话框打开文本文件,用了以下语句:GetFileName = Application.GetOpenFilename(FileFilter:="文本文件(*.txt),*.txt,HTML-files (*.htm*),*.htm*", Title:="请选取文本文件")
却提示"方法和数据成员未找到"的编译错误,请问高手们是如何实现对话框选择文件的.先谢了! Dim fdAs FileDialog Set fd = Application.FileDialog(msoFileDialogFolderPicker) fd.InitialFileName = DEFAULT_PATHNAEM If fd.Show = -1 Then For Each vrtSelectedItem In fd.SelectedItems strPathName = vrtSelectedItem Next vrtSelectedItem Else strPathName = DEFAULT_PATHNAEM End If Set fd = Nothing If Right(strPathName, 1) = "" Then myfolder = Trim(strPathName) & "按部门分发" Else myfolder = Trim(strPathName) & "按部门分发" End If
页:
[1]