View Single Post
  #2  
Old April 19th 07, 11:12 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default creating a macro using FIND

Instr() is the function available in VBA to search inside the text of one string for a particular substring.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"ale" wrote in message ...
I am trying to find a section of text in the title of the file I am opening.
If the FIND function worked in visual basic like it worked in an excel
worksheet I'd be done however that doesn't seem to be the case. Below is
what I tried. Any help on how I can get this to work?

Sub test()
Do
Application.FindFile
M1 = ActiveWorkbook.Name
Loop While Find("stat_output", M1) 1
End Sub

Ads