sandam
02-10-2005, 10:26 AM
I posted earlier today on how to save within a macro and thankfully with help from DRJ that problem is a thing of the past.
My new conundrum is how to save the documents using the description prescribed by our office manual as well as adding a unique identifier in case of same descriptions given to documents?
I was thinking of using a time stamp but the PCs on the network are not completely sync-ed so that may create name conflicts on the documents drive.
Any ideas, suggestions etc would be greatly appreciated :)
Sub SaveTheDoc(sFileSaved As Boolean, Optional sChangename As Boolean = False)
Dim DocDescrip As String
If Not sFileSaved Or sChangename Then
'Docdescrip is the user created description of the document
DocDescrip = InputBox("Please enter a description of the document save as", "SAVING DOCUMENT")
While Len(DocDescrip) = 0
DocDescrip = InputBox("Please enter a description of the document save as", "SAVING DOCUMENT")
Wend
'i need to add a unique identifeier to the end of it but am not sure how
DocDescrip = docsPath + getDirectory(selectDirectory) + DocDescrip
ActiveDocument.SaveAs FileName:=DocDescrip
ActiveDocument.AttachedTemplate.Saved = True
Else
ActiveDocument.Save
End If
End Sub
Thanks in advance
Andrew;?
My new conundrum is how to save the documents using the description prescribed by our office manual as well as adding a unique identifier in case of same descriptions given to documents?
I was thinking of using a time stamp but the PCs on the network are not completely sync-ed so that may create name conflicts on the documents drive.
Any ideas, suggestions etc would be greatly appreciated :)
Sub SaveTheDoc(sFileSaved As Boolean, Optional sChangename As Boolean = False)
Dim DocDescrip As String
If Not sFileSaved Or sChangename Then
'Docdescrip is the user created description of the document
DocDescrip = InputBox("Please enter a description of the document save as", "SAVING DOCUMENT")
While Len(DocDescrip) = 0
DocDescrip = InputBox("Please enter a description of the document save as", "SAVING DOCUMENT")
Wend
'i need to add a unique identifeier to the end of it but am not sure how
DocDescrip = docsPath + getDirectory(selectDirectory) + DocDescrip
ActiveDocument.SaveAs FileName:=DocDescrip
ActiveDocument.AttachedTemplate.Saved = True
Else
ActiveDocument.Save
End If
End Sub
Thanks in advance
Andrew;?