• Re-Save MS Word 2007 Doc from Sharepoint Site

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Re-Save MS Word 2007 Doc from Sharepoint Site

    Author
    Topic
    #484955

    My company posts some template docs on a sharepoint site. Users are supposed to re-save a doc from the sharepoint site to their local drives when they save them. However, it seems that not all of the users do this and sometimes the original template is overwritten on the sharepoint site. I suspect that the administrators of the sharepoint site could set writes so that users cannot re-save the doc and write to the sharepoint site. However, I’m hoping I can do this with a macro in Word. Right now, I have the doc set up to run a macro upon opening to flash instructions to the user (one of which is to re-save the file elsewhere). However, most users gloss right over this. I have experimented a bit with ChDir(), but can’t quite get anything to work. I’ve tried re-setting the save directory so that when the user tries to save the file it defaults to their local hard drive, but this doesn’t work. The file save as still defaults to the sharepoint site. So, I’m hoping someone has a macro that will check to see if the directory is on a sharepoint site and then change it before the user uses the file save as command? I’m not sure I’m making complete sense or describing this completely, so if not please let me know. This has been frustrating me for several hours this morning. 😉

    Thanks!

    -Rich

    Viewing 2 reply threads
    Author
    Replies
    • #1346450

      The whole problem would be sidestepped by using real templates (.dotx or .dotm) instead of “template docs”. Have each user point their Workgroup Templates folder to the SharePoint location, and use the New command instead of the Open command. That will create a document based on the template, and it will automatically request a new file name the first time it’s saved. It would still be a good idea to have the SharePoint folder permissions set so that only the people who create and maintain templates are able to write to it — ordinary users should not be able to “open” a template, only to “create new documents” from it (i.e., Read permission but not Write permission).

      The one complication occurs if the templates contain macros (and you won’t need the macro you were working on :)) — then each user also has to go into the Trust Center > Trusted Locations and add the SharePoint folder as a trusted location to allow the macros to run.

      Both of these locations can be set up for the users by creating a .reg file in regedit.exe, containing the SharePoint folder’s path in these entries:

      Key: HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0CommonGeneral
      Entry: SharedTemplates

      Key: HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0WordSecurityTrusted LocationsLocation3
      Entry: Path

      (You might need to use a different number in place of Location3 if users already have non-default trusted locations.)

      • #1346453

        Thanks for the suggestions. I tried using .DOT files (in case not everyone that grabs a template is using Word 2007 ). This wound up just opening the .DOT file for editing. There are embedded macros in the files. When the user opens the file, they have to click to allow the macros to run (mostly just a splash screen with instructions on how to complete the template). If we could fully educate the end users, or even trust them completely, or even go out and edit their registries (we’re pretty locked down at work), we could adopt many of your suggestions, but I think I need something where the end user just has to click on the file on the sharepoint site and open it and then when they go to try to save it, the macros force it to be saved to a local drive and not the sharepoint site. While I can certainly follow your suggestions and could implement them personally, we really need something that is more automatic for the end user so that we can force the save on the local drive and not the templates sharepoint site.

        Thanks!

    • #1346770

      When you say “This wound up just opening the .DOT file for editing”, do you mean you were double-clicking the template in SharePoint? I haven’t used SharePoint for a while so I don’t remember what it does in that situation. In Window Explorer, the default double-click action for a .dot or .dotx/.dotm file is New instead of Open, so you would get a new file based on the template instead of just the template itself. Maybe that isn’t true in SharePoint, although that would be kinda stupid.

      At any rate, you can write a macro named FileSaveAs in your document, and put into it the code shown at http://www.word.mvps.org/FAQs/MacrosVBA/ChangeSaveAsPath.htm. The most important unsaid thing there is to include the backslash at the end of the path you want to appear in the dialog.

    • #1347209

      Thanks for idea about using SaveAsPath. I believe that is going to work. Of course, a user can still click cancel and wreak havoc, but it’s a start.

      WRT your questions about opening .DOT files, they just open up in edit mode and not as a new un saved doc. I wish they opened up as the later because that would certainly solve my dilemma.

    Viewing 2 reply threads
    Reply To: Re-Save MS Word 2007 Doc from Sharepoint Site

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: