|
解决了!
非常感谢!参考了上面的帖子!
将代码贴出:
Sub ttt()
Dim tmp As String
Dim mypath As String
mypath = "D:\My Documents\Doc2.files\"
tmp = ActiveDocument.Paragraphs(5).Range.Text
tmp = Left(tmp, Len(tmp) - 2)
tmp = tmp & Format(Now(), "yyyy-MM-dd")
ActiveDocument.SaveAs FileName:=mypath & tmp & ".docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub |
|