Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can Word say where Sharepoint stores local copies?

    I have a routine in our commercial template package which copies styles from a site-specific customization file into the current doc at startup, using OrganizerCopy (which doesn't work for all attributes, but.. that's another show).
    When a document is opened from SharePoint, OrganizerCopy fails with a "File Not Found" error, because it's trying to copy the styles to the document at Document.FullName, which is
    http://mysharepointserver/mydocument...y/Document.doc
    However, if I record a macro using the Organizer manually, the macro stores a file location of
    Cocuments and SettingsusernameLocal SettingsTemporary Internet FilesContent.MSO8405E896.doc

    I can not find any Document attribute that contains that info, though. And yes, it still fails if I use Document.Name instead of Document.FullName.
    Any clues?

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Can Word say where Sharepoint stores local cop

    That sounds like an interesting problem and unfortunately I don't have sharepoint to do any testing with to suggest anything particularly insightful. I would suggest trying a few different things which might resolve it.
    1. Try saving the file as soon as it opens - perhaps this updates the true FullName
    2. Can you harvest the location that a hyperlink originates from within the file? eg wdPropertyHyperlinkBase

    As an aside, when looking for possible references I saw this kb which doesn't appear directly relevant but may catch you in the future How to make sure that Word 2007 documents that are created in a Windows SharePoint Services 3.0 document library use an up-to-date version of the document template
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Can Word say where Sharepoint stores local copies?

    I have just tried this and it behaves exactly as you describe, I couldn't see any easy workaround though!

    StuartR

  4. #4
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can Word say where Sharepoint stores local cop

    Andrew, thanks for the suggestion, but no, Word insists that it's "really" on the Sharepoint server (the URL spec) even when you save the sucker. Saving it to another location would be a bad thing, because then SharePoint doesn't know how to check it back in.

    I've even searched through the registry to see if the temp filename that's getting created has any relationship to anything (EMC Documentum uses that trick), but it's not there either -- Word must be just storing it in memory, and not telling anybody about it.

    The SharedWorkspaces and related objects don't reveal any clues either -- they only insist on knowing about the URL.
    If it wasn't for the security model, I'd consider recording a macro on the fly and reading its contents :^P. Actually, automating the Organizer dialog might be a crude and clumsy solution.

    The only other solution I've found to this particular problem is to use ActiveDocument.CopyStylesFromTemplate -- which despite its name can copy from a document too -- but it's not selective, it copies everything.
    On the other hand, that routine does not seem to lose paragraph style features either! For my next release, I think I'm probably going to bite that bullet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •