hi Ramesh ,
The following works for me:
Sub AutoSaveTest()
Dim intSv As Integer
intSv = Options.SaveInterval
MsgBox Options.SaveInterval
Options.SaveInterval = 0
MsgBox Options.SaveInterval
Options.SaveInterval = intSv
MsgBox Options.SaveInterval
End Sub
The above macro stores the current AutoSave interval and displays it, sets it to 0 and displays it, then sets it to the original
value and displays it.
You can see what it does via:
Sub AutoSaveTest()
Dim intSv As Integer
intSv = Options.SaveInterval
Application.Dialogs(wdDialogToolsOptionsSave).Show
Options.SaveInterval = 0
Application.Dialogs(wdDialogToolsOptionsSave).Show
Options.SaveInterval = intSv
Application.Dialogs(wdDialogToolsOptionsSave).Show
End Sub
--
Cheers
macropod
[Microsoft MVP - Word]
Ramesh papishetti said:
Hi macropod,
In word 2007 save auto recover information text its not accepting the value
0, when autosave is disabled by unchecking this check box word is disableing
the autosave textbox with minimum value 1, When i read Options.SaveInterval
value I am always getting positive (greater than zero) value.
macropod said:
Hi Ramesh,
In Word (including Word 2007), you can tell whether Autosave is 'On' by testing:
Options.SaveInterval
Any non-zero value means Autosave is 'On'.
Options.SaveInterval = 0
means Autosave is 'Off'. The fact that a greyed-out value might appear in the interval spinner is inconsequential.
--
Cheers
macropod
[Microsoft MVP - Word]
Ramesh papishetti said:
Hi,
I am doing word automation using word 2007 and c#, I want to know whether
word autosave is enabled or not using c# code.
Application.Options.AutosaveInterValue is giving the auto save interval
value but it'll not tell whether the auto save is enabled or not. In word
2007 even though auto save is disabled auto save interval value is greater
than zero.
Thanks