I have a table in word where one of the cells in each row holds a name of a file to be created.
Currently my VB code goes through each row looking in this cell, gets the contents and stores this in a varible, opens a word template and then saves the template as whatever has been written in the cell.
No matter how many times i tell the users, they always forget they cannot use characters like ?\/<>: in this cell because they are not allowed in file names. This obvisouly causes my code to error.
What i want it to do is check each character in the string for these reserved characters and if it finds one replace it with a hyphen so the code can carry on and save the template.
Im been messing around with InStr and Replace methods but im not getting very far.
Anyone able to help me?