I have been using word 2003 with VBA code for macros and custom forms,
and everything was fine until I "upgraded" to office 2007 (full install).
Now, the following code errors on the Application.Filesearch line and when I mouse over it I see....
"With Application.Filesearch = <This command is not available on the current platform>"
I have the same references except that the Microsoft Word 11.0 Object Library and Microsoft Office 11.0 Object Library were changed to 12.0
With Application.Filesearch
.lookin = templatepath
.searchsubfolders = true
.filename = "*.dot"
.. and so on.
Thsi code populates a ListBox on a form with the template to choose for custom letters. It is a pain not to have it.
Any suggestions ?
Thank you ,
Jim
jimoc wrote:
> Hello,
>
> I have been using word 2003 with VBA code for macros and custom forms,
> and everything was fine until I "upgraded" to office 2007 (full
> install).
>
> Now, the following code errors on the Application.Filesearch line and
> when I mouse over it I see....
>
> "With Application.Filesearch = <This command is not available on the
> current platform>"
>
> I have the same references except that the Microsoft Word 11.0 Object
> Library and Microsoft Office 11.0 Object Library were changed to 12.0
>
>
> With Application.Filesearch
> lookin = templatepath
> searchsubfolders = true
Funny thing is, this is on a new Windows 7 system not XP. Maybe it was because I upgraded from 2003 to 2007.
I'll try the fixes mentioned in the article.
Again, my thanks
Jim
Dim strPath As String
Dim strFilename As String
Dim sList As String
strPath = "D:\My Documents\Test\"
sList = ""
strFilename = Dir$(strPath & "*.docx")
While Len(strFilename) <> 0
sList = sList & strFilename & vbCr
strFilename = Dir$()
Wend
MsgBox sList
instead
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
"jimoc" <ji...@comcast.net> wrote in message
news:6t2dnUC_d8yIZB3R...@giganews.com...