View Single Post
  #3  
Old May 19th 08, 11:35 PM posted to microsoft.public.outlook.program_vba
ExcelLars
external usenet poster
 
Posts: 19
Default Strip illegal character from filename

looks very nice, but will not work for me.
.......
Dim ar()
Dim i&
Dim ReplaceBy$
ReplaceBy = "_"
ar = Array(";", ":", ",", "\", "/", "*", "[", "]", "?",
"!", "'", "", "", "|", "$")
For i = 0 To UBound(ar)
Emne = Replace(1, Emne, ar(i), ReplaceBy, vbTextCompare)
Next

filnavn = Mdato & " " & Avsendernavn & " " & Emne & ".MSG"
txtPath = TextBox1.Value

myOlSel.Item(x).SaveAs txtPath & filnavn, olMSG 'export
message
Ads