![]() |
|
#1
|
|||
|
|||
|
I have a document that is shared by users using both Office 2007 and 2010. As such, with 2010, the SaveAs has been depreciated and I need to use SaveAs2.
When I try to 'trap' this, I receive an error on the Office 2007 machines, as Office 2007 doesn't recognize SaveAs2 in the code. Here's what I have in the Document_Close event: Code:
With ThisDocument
Select Case Application.Version
Case "12.0"
'Save the document
.Save
'Save the document as ARCHIVE
.SaveAs FileName:="\\...\Unit3 Archive\Doc2" & Format(Now(), "yymmdd hh:mm"), _
FileFormat:=wdFormatXMLDocument, _
LockComments:=True, _
Password:="", _
AddToRecentFiles:=False, _
WritePassword:="xxxx", _
ReadOnlyRecommended:=True, _
EmbedTrueTypeFonts:=True, _
SaveNativePictureFormat:=False, _
SaveFormsData:=False, _
SaveAsAOCELetter:=False
Case "14.0"
'Save the document
.Save
'Save the document as ARCHIVE
.SaveAs2 FileName:="\\...\Unit3 Archive\Doc2" & Format(Now(), "yymmdd hh:mm"), _
FileFormat:=wdFormatXMLDocument, _
LockComments:=True, _
Password:="", _
AddToRecentFiles:=False, _
WritePassword:="xxxx", _
ReadOnlyRecommended:=True, _
EmbedTrueTypeFonts:=True, _
SaveNativePictureFormat:=False, _
SaveFormsData:=False, _
SaveAsAOCELetter:=False, _
CompatibilityMode:=14
End Select
End With
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How do you save different 'versions' onto the same file (Office 2007)
|
kholmesmcgov | Word | 2 | 11-17-2013 01:45 PM |
| Two versions of MS Office | Glenwvdp | Office | 1 | 11-05-2012 02:02 PM |
| Multiple versions of Office on the same network. | whatrudoingdave | Office | 1 | 04-30-2012 03:36 PM |
| using 2 office versions but automaticly chose the old one | garfy | Office | 0 | 07-15-2010 04:48 AM |
MS Office 2007 Versions
|
daufoi | Office | 3 | 01-08-2010 12:51 PM |