Paul W Smith said:
I am not using any exchange enviroment, just Outlook 2003, XP professional
and a ISP account.
Then I'm afraid you're really out of luck, especially if you don't want to
be troubled to do what Diane suggested which is the only method I could
think to guarantee that the file is read-only. And even then, I wouldn't
trust any of the Office apps to use a uncrackable password scheme. Another
option would be to try Microsoft's public DRM server. But that code
probably wouldn't work if it was DRM'd read only.
But, as for simply setting a file's attribute to Read-Only, well.... Once
the file is on the end-users machine, they are able to do whatever they want
to it (unless DRM prevents it), even if for some reason the File System
attribute of read-only was maintained as the file moved across the internet,
there is no way you can prevent them from removing that attribute. Even DRM
won't keep that attribute. It will simply make the file read-only in Excel,
not in the OS. Heck, consider the fact that you have no way of knowing that
they are even going to be using Outlook. So, whatever you need to do, you
need to do it *in the file* not in Outlook or the File System.
The only other possibility would be a third party DRM system, which, again,
wouldn't work with that code.
Basically, unless you can control the file share access permissions, your
code isn't going to work. Even then, I don't think NT has implemented a
No-Copy permission, so if a user were to copy the file off a share, your
code could still break. My suggestion, hit up an excel newsgroup and try to
find the best way to rewrite the code and make it work. This is *not* an
Outlook issue. Don't believe me? Fire up hotmail, gmail, yahoomail and
send the file to someone. See if it maintains Read-Only. Not to mention,
see if the user can't just remove that attribute anyways.