Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2012, 04:43 AM
Elli Elli is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 64bit
Novice
Save and restore Word session
 
Join Date: Oct 2012
Posts: 2
Elli is on a distinguished road
Default Save and restore Word session

Hi,
In browsers such as Firefox or Chrome there are extensions that allow you to save a session state, close all windows at once, and restore them at a later time. This is useful if you open many windows, need to restart your computer and get back to working on them later.



I cannot find such functionality in Word.

Often I have 10-15 documents open, and then need to restart my computer for one reason or another (e.g., installing a new program or updating virus definition). I then have to manually close all word documents one by one, restart, and then remember what I had open and open them one by one.

Word will do this for you if your computer crashes, but why can't this be done on the initiative of the user without a crash (or can it)?

Last edited by Charles Kenyon; 02-05-2017 at 10:29 AM. Reason: Mark as solved
Reply With Quote
  #2  
Old 07-04-2013, 04:22 AM
thefrasers's Avatar
thefrasers thefrasers is offline Save and restore Word session Windows XP Save and restore Word session Office 2007
Novice
 
Join Date: Apr 2010
Posts: 4
thefrasers is on a distinguished road
Default Awesome question...

...does anyone have a reply?

I suspect one could write some VBA code in specific cases, but is there a simple tool which allows you to do this?
Reply With Quote
  #3  
Old 07-04-2013, 04:26 AM
Elli Elli is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 64bit
Novice
Save and restore Word session
 
Join Date: Oct 2012
Posts: 2
Elli is on a distinguished road
Default Thanks - i'm still waiting...

Quote:
Originally Posted by thefrasers View Post
...does anyone have a reply?

I suspect one could write some VBA code in specific cases, but is there a simple tool which allows you to do this?
I haven't found any good tool for this yet.
Reply With Quote
  #4  
Old 07-04-2013, 11:38 AM
fumei fumei is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

There is no simple (or native) functionality in Word to do this. The recovery functionality in Word for this (and it it is not perfect) is not really native to Word either. It uses WINDOWS functions. Yes I suspect you could try and use VBA to come up with a clunky workaround.

Quote:
I then have to manually close all word documents one by one, restart, and then remember what I had open and open them one by one
First of all I would not try and remember them. Write them down (I am kidding...I assume you were as well. You would in fact write them diown.). You could use the Recent Files collecton, although you are limited to the number in that list.
Reply With Quote
  #5  
Old 12-30-2014, 06:19 PM
bond1cht bond1cht is offline Save and restore Word session Windows 7 32bit Save and restore Word session Office 2010 32bit
Novice
 
Join Date: Dec 2014
Posts: 2
bond1cht is on a distinguished road
Default

I've been asking around for a solution to this work issue for more than a decade.

I always find it hard to understand why it is so hard to understand how useful an option like this would be for some people.

Always useless to say that this option was very naturally incorporated into predecessors and early versions of OpenOffice. Then developers, so it seems, just stopped seeing the use of it and became blind to the needs of writing people.

So I have little hope that people who might be able to fix the problem will understand what the problem is. Strange stupidity. (Sorry - I just spent too much time on postings about this.)

And I am absolutely certain that for experts who are good at macros and programming it would be absolutely easy to do this. The problem is, nobody seems to be interested in helping a certain subgroup of writing people.

Have I given up? Not really. Under PlayOnLinux, a very old addon named "Workspce.dot" still works. Unfortunately, under Win7 it doesn't. Maybe there are ways to reanimate it. Strangely enough, in Google "Workspce.dot" does not generate any hits any more!
Reply With Quote
  #6  
Old 12-31-2014, 12:51 AM
gmayor's Avatar
gmayor gmayor is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

One possibility is http://www.gmayor.com/open_documents_from_list.htm. It doesn't do exactly what you asked, but it is close.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 12-31-2014, 06:38 AM
thefrasers's Avatar
thefrasers thefrasers is offline Save and restore Word session Windows XP Save and restore Word session Office 2007
Novice
 
Join Date: Apr 2010
Posts: 4
thefrasers is on a distinguished road
Default Enormous thanks...

...for your reply to a VERY old thread. I had given up. Your add-in seems to work (haven't tried too hard yet) altho' installation could be easier (I may just have been stupid). I installed template before running the app in the zip file - it didn't like this and the app could not find the macro. Had to delete and start over.

Looks good now though.
Reply With Quote
  #8  
Old 12-31-2014, 08:17 AM
gmayor's Avatar
gmayor gmayor is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The zip file includes the template and a self extracting installer. There is no need to use both types of installation. As long as the template is in the Word Startup Folder (which you must have by now) then you are good to go.

If Word was running, then the installer would not have been able to replace the file that was in use, which may have been your problem. The readme file that explains all appears to have gone walkabout. I'll make sure it is restored.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com

Last edited by Charles Kenyon; 10-27-2017 at 05:53 AM.
Reply With Quote
  #9  
Old 09-10-2015, 02:18 PM
bond1cht bond1cht is offline Save and restore Word session Windows 7 32bit Save and restore Word session Office 2010 32bit
Novice
 
Join Date: Dec 2014
Posts: 2
bond1cht is on a distinguished road
Default "Restore Workspace" possible in new versions of MS Office??

Hi,

well, I keep trying, over the years - with fainting hope.

Maybe there is one person at Microsoft with a heart for people like us who are working with many files at a time? Hi there?

Maybe not.

But does anyone of you, the readers of this thread, know if Microsoft Office 2016 or Office 365 offers that ancient and forgotten function of restoring each and every file you have been working on in the last session?

For me, this really would be a reason to get a copy of a new version of Word!!! (Listen up, there at Microsoft.)

I would like to quote Elli, who started this thread, to strengthen his/her and our point:

"In browsers such as Firefox or Chrome there are extensions that allow you to save a session state, close all windows at once, and restore them at a later time. This is useful if you open many windows, need to restart your computer and get back to working on them later.

I cannot find such functionality in Word.

Often I have 10-15 documents open, and then need to restart my computer for one reason or another (e.g., installing a new program or updating virus definition). I then have to manually close all word documents one by one, restart, and then remember what I had open and open them one by one.

Word will do this for you if your computer crashes, but why can't this be done on the initiative of the user without a crash (or can it)?"
Reply With Quote
  #10  
Old 09-10-2015, 02:55 PM
Charles Kenyon Charles Kenyon is offline Save and restore Word session Windows 8 Save and restore Word session Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Try saving but not closing the Word documents. Next time you open Word you may get a restoration pane. I seldom close Word to restart, I let the computer close it for me. This works for me in Word 2010 and 2013.

If that won't work, try pressing the space bar and then a backspace (not undo) after saving . That will dirty the document and give the restore facility something to work with if the first method didn't work.

Otherwise, there is the Recent Documents in backstage. I have mine set to recall 50 which works out to 25 documents and 25 folders/locations.
Reply With Quote
  #11  
Old 09-10-2015, 08:37 PM
gmayor's Avatar
gmayor gmayor is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Quote:
Originally Posted by bond1cht View Post
But does anyone of you, the readers of this thread, know if Microsoft Office 2016 or Office 365 offers that ancient and forgotten function of restoring each and every file you have been working on in the last session?
I can say without fear of contradiction that these versions do not offer that facility.

Assuming you are not the same person as 'thefrasers', did you look at the link I posted back in 2014? http://www.gmayor.com/open_documents_from_list.htm

This add-in was aimed at those who work with specific documents sets. It will close down the set or open the set at a single click. Adding and removing items from the list of documents to open are simple button clicks also.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #12  
Old 09-11-2015, 12:35 AM
macropod's Avatar
macropod macropod is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by bond1cht View Post
Maybe there is one person at Microsoft with a heart for people like us who are working with many files at a time? Hi there?
...
For me, this really would be a reason to get a copy of a new version of Word!!! (Listen up, there at Microsoft.)
In case you haven't noticed, no-one here works for Microsoft. In any event, opening a document and pressing Shift-F5 returns you to the last edit point.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #13  
Old 09-13-2015, 04:39 AM
gmayor's Avatar
gmayor gmayor is offline Save and restore Word session Windows 7 64bit Save and restore Word session Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Following on the comments made in this forum thread about a facility to save the open documents and restore them automatically on re-opening Word, I have come up with an add-in template that will facilitate this, subject to a few minor provisos mentioned in the web page - http://www.gmayor.com/SaveRecordAndClose.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #14  
Old 02-05-2017, 05:05 AM
5kldqw 5kldqw is offline Save and restore Word session Windows XP Save and restore Word session Office 2010 32bit
Novice
 
Join Date: Feb 2017
Posts: 2
5kldqw is on a distinguished road
Default VBA Macro for opening and saving Word sessions

Hello everybody, after reading this forum and searching for myself I've decided to create a VBA macro for opening and restoring Word session that wouldn't close and save them in the process, because I couldn't find it anywhere else on the internet. Otherwise you can use an excellent gmayor add-in.

Here is a brief description of what the macro does:

  • it saves all currently opened word files path (a session) to a text file (except the unsaved files) into a specified folder
  • it opens the saved session specified by user (only files with unaltered path and name will be opened)
  • you can have as many sessions saved as you want and even change their name, delete them or specify the files in the session (using your favourite file manager and notepad)
Install instructions
  1. Add the VBA code (Macro) to the Word (e.g. using alt+f11). Please use other guides. Adding buttons is advised.
  2. Create a folder where sessions will be stored. Default folder path is "C:\vba". Suggested location of folder is in My Documents. Full path to the folder must then be entered in the code here (underlined part of the line): Set ts = fso.CreateTextFile("C:\vba\" & FileName, True)
  3. Verify that the Microsoft Scripting Runtime (scrrun.dll) is enabled in the references. Press alt+f11->tools menu->references and look for the Microsoft Scripting Runtime. Once found check if a checkbox next to it is checked. If not then check it and press OK.
  4. Test if the Macro works.
Use Instructions
  • Open a few saved files (not mandatory but suggested)
  • Run the SessionSave macro (e.g. by pressing the button you created or from the macros list)
  • That should have resulted in the file (session) being created in the specified folder (session is specified by current date and time). If saving was successful the window will popup (saying the saving was successful).
  • Close opened files (again not mandatory)
  • Run OpenSession macro.
  • Navigate to the folder you specified earlier with saved sessions.
  • Choose one file and click open.
  • The session should now be restored. You will be informed on the number of successfully and unsuccessfully opened files.
VBA Code (Macro)
Code:
Sub SessionSave()
' Created 04.02.2017
' Updated 05.02.2017
'
' Macro for word opened files session saving
'
' Microsoft scripting runtime (scrrun.dll) must be enabled in references
'
' This procedure saves current word session (opened windows) in a text file
' for later loading of the session.

' Declare variables
Dim Saved As Integer
Dim Unsaved As Integer
Dim fso As New FileSystemObject
'the file we're going to write to
Dim ts As TextStream
Dim FileName As String
Dim UnsavedName As String
    
    'open this file to write to it, where file name is composed of the current date and time
    'file with the same name will be overwritten
    FileName = Year(Now) & Format(Now, "mm") & Format(Now, "dd") & "_" & _
    Format(Now, "hh") & Format(Now, "nn") & Format(Now, "ss") & ".txt"
    Set ts = fso.CreateTextFile("C:\vba\" & FileName, True)
    
    'These two variable should say how many opened windows were saved and which remained unsaved
    'unsaved are those that are not saved on the disk yet
    Saved = 0
    Unsaved = 0
    
    'This cycle will loop through opened files and saves them into the file
     For Each adoc In Documents
    
     Debug.Print adoc.Path&; "\" & adoc.Name
        If adoc.Path <> "" Then
            ts.WriteLine (adoc.Path & "\" & adoc.Name)
            Saved = Saved + 1
        ElseIf adoc.Path = "" Then
            Unsaved = Unsaved + 1
            UnsavedName = UnsavedName + adoc.Name + ","
        Else
            Debug.Print ("Error saving file path")
        End If
     Debug.Print adoc.Path&; "\" & adoc.Name
    
    Next adoc
    
    'closes the file
    ts.Close
    
    'informs user on the result of the procedure
    MsgBox "Saving of the session" & FileName & " was successful. There are " & _
            Saved & " files recorded. Unrecorded files number is " & Unsaved & "(" & UnsavedName & ")." _
            , vbInformation, "Session save result"
End Sub

Sub OpenSession()
' Created 04.02.2017
' Updated 05.02.2017
'
' Open saved session of word files Macro
'
' Microsoft scripting runtime (scrrun.dll) must be enabled in references
'
' This procedure opens saved sessions (opened windows) from text files
' created by the SessionSave procedure.
'
Dim fso As New FileSystemObject
'the file we're going to read from
Dim ts As TextStream
Dim FilePath As String
Dim ThisLine As String
Dim i As Integer
Dim FilesNotFound As String

'only allow the user to select one file
'make the file dialog visible to the user
With Application.FileDialog(msoFileDialogOpen)
    .AllowMultiSelect = False
    .Show

    If (.SelectedItems.Count = 0) Then
        Exit Sub
        '// dialog dismissed with no selection
    Else
        FilePath = .SelectedItems(1)
    End If
End With

'... we can open a text file
Set ts = fso.OpenTextFile(FilePath, ForReading)

'keep reading in lines till no more
    FilesNotFound = ""
    i = 0
    Do Until ts.AtEndOfStream
        ThisLine = ts.ReadLine
        i = i + 1
        'Debug.Print "Line " & i, ThisLine
        If (Dir(ThisLine) > "") Then 'check if the file exists
            Documents.Open FileName:=ThisLine
        Else 'if it doesn't exist then save the filename
            FilesNotFound = FilesNotFound + ThisLine + ", "
        End If
    Loop

'close down the file
ts.Close

'Tell the user if the opening of the session was successful; if not then tell, which files couldn't be opened
If FilesNotFound = "" Then
    MsgBox "Session " & FilePath & ": All the files were opened.", vbInformation
Else
    MsgBox "Session " & FilePath & ": Those files could not be opened (path not found): " _
    & FilesNotFound, vbExclamation
End If

End Sub
Feel free to alter the code as you wish, just please post your updates to this forum. Please also post here if you had any trouble installing or running the macro. The Macro has been tested on WinXP and Word 2010 (both 32bit).
5kldqw

Last edited by 5kldqw; 02-05-2017 at 11:03 AM.
Reply With Quote
  #15  
Old 02-05-2017, 10:28 AM
Charles Kenyon Charles Kenyon is offline Save and restore Word session Windows 10 Save and restore Word session Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by 5kldqw View Post
Hello everybody, after reading this forum and searching for myself I've decided to create a VBA macro for opening and restoring Word session, because I couldn't find it anywhere else on the internet.
***

5kldqw
Thank you for posting this. It looks like quite a piece of work. However, for most users, I would recommend using the Save Record of Open Documents And Close Add-In that Graham posted in 2015. Your macro could help in instances where his Add-In is not useful.
Reply With Quote
Reply

Tags
restore, session



Similar Threads
Thread Thread Starter Forum Replies Last Post
Save and restore Word session How to Restore Heading 1, Heading 2, etc. within a Word Document cheech1981 Word 9 01-11-2017 02:14 AM
Word ask to save template whenever i save a derived document jorbjo Word 3 10-04-2012 10:52 AM
Save and restore Word session PPT save issue - can't restore previous copy? GrahamBerry PowerPoint 1 04-23-2012 10:33 AM
Save and restore Word session How to Restore Page Margin Page Number Styles in Word 2010 cheech1981 Word 5 11-15-2011 04:16 AM
Restore .pst from .bak? markg2 Outlook 0 04-12-2010 05:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft