how to encode vcard filenames without umlauts, etc

  • Thread starter Thread starter leo
  • Start date Start date
L

leo

hi there

i wrote a macro to extract all my contacts to vcards. for writing the files
i use:

sName = path & Item.FileAs & ".vcf"
Item.SaveAs sName, olVCard

sName now can contain umlaute, etc, which clash as a filename with some
filessytems, etc.

how can i avoid that? can i encode the FileAs property somehow?

thanks a lot, leo
 
You would have to strip illegal characters from the name in your code. Use
the Replace function for that:
sName = Replace(sName, "~", "")
and so on for any illegal characters that might appear in the name.
 
Back
Top