First off - should look into the permissions issue rather than tackling the exception solely. If "Access Denied" is thrown then there must either be a permissions issues or a lock of some sort.
Anyways, "Message" is a string and you can use the .Contains method on it to check for "Access Denied".
You can't change the "Message" property as it has no setter, but you can handle the exception and display a polite message.
MessageBox.Show("Sorry, Access Denied"); for instance.
Edit: as mentioned above you should check for the type of exception. e.g. AccessDeniedException rather than use something as generic as "Exception".
try
{
// code here which throws exception
}
catch (Exception ex)
{
if (ex.Message.Contains("Access Denied"))
{
MessageBox.Show("Sorry, Access Denied", "This is a polite error message");
}
}