A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

creating a macro using FIND



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 19th 07, 08:46 PM posted to microsoft.public.outlook.program_vba
Ale
external usenet poster
 
Posts: 6
Default creating a macro using FIND

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
  #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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook macro abends but Word macro runs successfully Jreue Outlook and VBA 0 December 14th 06 12:55 AM
Creating a macro for archiving karamatic Outlook and VBA 1 October 10th 06 07:46 AM
Creating macro that will sort emails into folders based on text in body mugginns Outlook and VBA 5 October 3rd 06 08:49 AM
Creating a macro... I think Casey Outlook - General Queries 9 July 27th 06 06:29 PM
Creating a new Macro in Outlook jpotucek Outlook and VBA 3 April 27th 06 03:30 PM


All times are GMT +1. The time now is 08:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.