Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / General MS Outlook Questions / March 2008

Tip: Looking for answers? Try searching our database.

Trimming File Extension from File Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 17 Mar 2008 15:18 GMT
Hi,

I'm trying to trim the extension from a file name. I have been able to get
the extension now I just need to get only the name. Here's what I have.

   Dim Item As Object
   Dim Atmt As Attachment
   Dim fExt As String
   Dim fName As String

       For Each Atmt In Item.Attachments
       fExt = Right(Atmt.FileName, 4)   'returns the .??? extension
       fName =

Thanks Much.
Rob
Michael Bauer [MVP - Outlook] - 17 Mar 2008 15:47 GMT
Yu cannot be sure that the extension has a length of four characters, or?
It's better to search backwards for the dot, use the InstrRev function for
that. Once, you know where the dot is, everyting right of it is the
extension and left of it the file name.

For more programming related questions visit
microsoft.public.outlook.program_vba, please.

Signature

Best regards
Michael Bauer - MVP Outlook
 Use Outlook Categories? This is Your Tool:
 <http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Mon, 17 Mar 2008 07:18:04 -0700 schrieb Rob:

> Hi,
>
[quoted text clipped - 12 lines]
> Thanks Much.
> Rob
Rob - 17 Mar 2008 16:06 GMT
Why can't I ever get a straight answer when it comes to Outlook? I'm not that
darn savvy on this kind of stuff, at best I fumble around and come up with
the right answer after tons of help.

Since I've obviously triggered something by posting here, I'll repost it
where you suggested. But can I actually get the answer I'm looking for there?

> Yu cannot be sure that the extension has a length of four characters, or?
> It's better to search backwards for the dot, use the InstrRev function for
[quoted text clipped - 20 lines]
> > Thanks Much.
> > Rob
John Blessing - 17 Mar 2008 18:41 GMT
> Why can't I ever get a straight answer when it comes to Outlook? I'm
> not that darn savvy on this kind of stuff, at best I fumble around
[quoted text clipped - 38 lines]
>>> Thanks Much.
>>> Rob

Calm down, calm down. No one here gets paid for answering your questions. A
little civility goes a lonnnnnnnnnnnnnnnnnnnnnggggg way.
Signature

John Blessing

http://www.LbeHelpdesk.com - Help Desk software
http://www.room-booking-software.com - Schedule rooms & equipment
bookings http://www.lbetoolbox.com - De-Duplicates MS Outlook
http://www.repeatmail.com - schedule mass individual emails


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.