/ Forums / Advansys Formativ / Creating Solutions with Formativ / Retrieving Mailbox FID / Reply To: Retrieving Mailbox FID
April 18, 2010 at 5:52 pm
#8174
Thanks for the explanation.
May be you can use the account email address which is unique. The code below uses the email address, it will remove any invalid characters (i.e. ?, :, etc) from the email address.
Sub Main(Client, GWEvent) dim oAccount Set oAccount = client.clientstate.currentaccount msgbox ReplaceInvalidFileName(oAccount.owner.emailaddress) set oAccount = nothing End Sub ' Replace invalid characters from file name function ReplaceInvalidFileName(aFileName) Set oRegExp = New RegExp oRegExp.Global = True oRegExp.IgnoreCase = True oRegExp.Pattern = "[t""*/:;<>?\|]" ReplaceInvalidFileName = oRegExp.Replace(aFileName, "_") set oRegExp = nothing end function
Hope this helps.
Regards,
Advansys Support