totalnovice2
Registered User.
- Local time
- Today, 23:26
- Joined
- May 21, 2013
- Messages
- 36
Hello.
I hope someone can help. I use the below code as part of a database which creates documents and then saves them using data from the form fields.
Every now and again one of the form fields contains a "special" character such as /,@,& and this prevents the file from saving.
Is there a simple addition to the below code to remove special characters from the file name if there is one present? It causes all sorts of issues as many people don't realise that there has been a problem until it is too late.
Fingers crossed someone can help
I hope someone can help. I use the below code as part of a database which creates documents and then saves them using data from the form fields.
Every now and again one of the form fields contains a "special" character such as /,@,& and this prevents the file from saving.
Is there a simple addition to the below code to remove special characters from the file name if there is one present? It causes all sorts of issues as many people don't realise that there has been a problem until it is too late.
Fingers crossed someone can help

Code:
objWord.ActiveDocument.SaveAs2 FileName:="C:\Users\Public\" & Forms![Front Page]![Site 2 Name] _
& " " & Forms![Front Page]![Combo79] & " " & "O2" & ".doc"
objWord.ActiveDocument.Close
Last edited: