![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |