Microsoft KB Archive/920229

= Error message when you run a macro to search for a file in an Office 2007 program: &quot;Run-time error 5111&quot; =

Article ID: 920229

Article Last Modified on 10/15/2007

-

APPLIES TO


 * Microsoft Office Access 2007
 * Microsoft Office Excel 2007
 * Microsoft Office PowerPoint 2007
 * Microsoft Office Visio Professional 2007
 * Microsoft Office Visio Standard 2007
 * Microsoft Office Word 2007

-





SYMPTOMS
You run a Microsoft Visual Basic for Applications (VBA) macro in a Microsoft Office 2007 program to search for a file on your computer. When you do this, you may receive the following VBA error message:

&quot;Run-time error 5111

The command is not available on this platform&quot;



CAUSE
This issue occurs when you have 2007 Offce programs installed on a Microsoft Windows XP computer, and the VBA macro uses the Application.FileSearch property. This property is no longer supported in 2007 Offce programs.



MORE INFORMATION
An alternative solution might be to script the Windows Desktop Search. For more information about this feature, visit the following Microsoft Web site:

http://www.microsoft.com/technet/scriptcenter/topics/desktop/wdsearch.mspx

Additional query words: PPT2007 PowerPoint2007 XL2007 Excel2007 WD2007 Word2007 Office2007 OFF2007 Office 2007

Keywords: kberrmsg kbtshoot kbprogramming kbautomation kbprb kbexpertiseinter kbexpertisebeginner KB920229

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.