R
Rob
I was told I should use this section for my request for help so here I go
again.
I am trying to seperate the extension from a file name so that what I am
left with is an extension and a file name that's stored in String Variables
for re-use later on in the macro. I have no clue how to really do this but
what I have gotten so far is below and apparently that's not all that right
either. Can someone please show me the right way of doing this so I can have
it to refer to in the future, because I can't seem to find it with the help
files of Outlook?
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 =
For the fName above I tried to do a Trim/RTrim & LTrim but all I get in the
help keeps referring to (Expression) with no clue as to what expression is
the correct expression. Also Apparently there is a possibility of there being
more than three letters and a dot for the extension so now I have to look at
using "InstrRev" to find the dot and then figure out the right side verses
the left side. What if there's more than one dot in the name of the file,
wouldn't that throw it all off??? I have NO idea what to do with that at all.
When I do the F1 deal in the macro editor, well I'm lost at that too.
Thank You Very Much for Your Time and Help.
Rob
again.
I am trying to seperate the extension from a file name so that what I am
left with is an extension and a file name that's stored in String Variables
for re-use later on in the macro. I have no clue how to really do this but
what I have gotten so far is below and apparently that's not all that right
either. Can someone please show me the right way of doing this so I can have
it to refer to in the future, because I can't seem to find it with the help
files of Outlook?
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 =
For the fName above I tried to do a Trim/RTrim & LTrim but all I get in the
help keeps referring to (Expression) with no clue as to what expression is
the correct expression. Also Apparently there is a possibility of there being
more than three letters and a dot for the extension so now I have to look at
using "InstrRev" to find the dot and then figure out the right side verses
the left side. What if there's more than one dot in the name of the file,
wouldn't that throw it all off??? I have NO idea what to do with that at all.
When I do the F1 deal in the macro editor, well I'm lost at that too.
Thank You Very Much for Your Time and Help.
Rob