There is no "original" file. The attachment is a binary blob property on the
message. In order to make it usable as a file, Outlook must save it first.
Why does this cause a problem for your automation?
I don't know of any reason why custom document properties wouldn't be
available. Can you provide a test scenario?

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
>There is no "original" file. The attachment is a binary blob property on the
>message. In order to make it usable as a file, Outlook must save it first.
Oh, that explains it. I've got so used to Windows creating shortcuts to
files that I assumed that this was the same.
>Why does this cause a problem for your automation?
That itself isn't such a problem for the automation, it's the loss of
properties that is the real problem. This just means that if someone
double-clicks the file from the Outlook item and edits it, when they
save it, it will not just save an updated version of the original. That
makes life difficult for the users.
If I can't get Outlook to open the original file, then the properties
issue isn't relevant anyway as the user will have to open the original
file anyway.
>I don't know of any reason why custom document properties wouldn't be
>available. Can you provide a test scenario?
I don't know if anything short of the full code I have will demonstrate
the problem. I can happily send you the Word template that contains the
code if you like. I would post it here, but some people seem to object
to binaries posted in these groups (not without reason I might add
before anyone jumps on me !!).
So my bigger issue is, can I add a shortcut to a Word doc instead of the
binary blob ?
Thanx

Signature
Alan Silver
(anything added below this line is nothing to do with me)
Sue Mosher [MVP-Outlook] - 21 Jul 2004 18:11 GMT
If the user opens the message, double-clicks the file, makes changes, saves
the file, then sames the message, the updated file should be stored back in
the message.
You can certainly add a shortcut to a file. Because of security concerns
about attachments, an HTML message body with an <a> link pointing to a
file:// hyperlink would be my choice.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> >There is no "original" file. The attachment is a binary blob property on the
> >message. In order to make it usable as a file, Outlook must save it first.
[quoted text clipped - 27 lines]
>
> Thanx
Alan Silver - 21 Jul 2004 22:36 GMT
>If the user opens the message, double-clicks the file, makes changes, saves
>the file, then sames the message, the updated file should be stored back in
>the message.
Hmm, not a bad idea, except that the customer will want his Word files
stored in his hard disk as files.
Still, worth knowing about for other cases.
>You can certainly add a shortcut to a file. Because of security concerns
>about attachments, an HTML message body with an <a> link pointing to a
>file:// hyperlink would be my choice.
Now that sounds like a clever solution. How would I set the body of the
message in code ? I don't know if it's relevant, but this is an
appointment item, not a mail message. I couldn't see any property that
would set this.
Failing HTML, how would I put a shortcut in the body from code ?
I'm using Office 97 if it makes any difference.
Thanx very much for all the help

Signature
Alan Silver
(anything added below this line is nothing to do with me)
Sue Mosher [MVP-Outlook] - 21 Jul 2004 23:26 GMT
If it's an appointment item, try somethign along the lines of:
Item.Body = "<file://\\server\share\filename.doc>"

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> >If the user opens the message, double-clicks the file, makes changes, saves
> >the file, then sames the message, the updated file should be stored back in
[quoted text clipped - 19 lines]
>
> Thanx very much for all the help
Alan Silver - 22 Jul 2004 14:41 GMT
>If it's an appointment item, try somethign along the lines of:
>
>Item.Body = "<file://\\server\share\filename.doc>"
Fantastic !! I never knew you could do that with the Body of an item.
Any way I can make it a link, but have it displayed as just the file
name ? Using the method above, the user sees the <file:// and > bits.
Thanx very much.

Signature
Alan Silver
(anything added below this line is nothing to do with me)
Sue Mosher [MVP-Outlook] - 22 Jul 2004 15:33 GMT
Not in an appointment item, which doesn't support HTML.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> >If it's an appointment item, try somethign along the lines of:
> >
[quoted text clipped - 6 lines]
>
> Thanx very much.
Alan Silver - 22 Jul 2004 17:25 GMT
>Not in an appointment item, which doesn't support HTML.
OK, what I have is certainly better than what I had before, so I'm not
complaining ;-)
Thanx again for all the help

Signature
Alan Silver
(anything added below this line is nothing to do with me)