Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / New Users / July 2004

Tip: Looking for answers? Try searching our database.

Opening file from an item loses Word document properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Silver - 21 Jul 2004 16:29 GMT
Hello,

I have just discovered that when you double-click a Word file attached
to an appointment item (although I imagine it will be the same for other
items too), Outlook does not open the actual file, but takes a copy and
puts it in the temp folder and opens that.

This is a pain as it mucks up some of the automation coding I have done,
but what's worse is that the copy doesn't seem to have the custom
properties I have set.

Is there any way of forcing Outlook to open the original, instead of a
copy? Failing that, any ideas why the custom document property would
have been lost in the copy ?

TIA

Signature

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

Sue Mosher [MVP-Outlook] - 21 Jul 2004 17:03 GMT
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

> Hello,
>
[quoted text clipped - 12 lines]
>
> TIA
Alan Silver - 21 Jul 2004 17:21 GMT
>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)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.