|
楼主 |
发表于 2016-7-20 13:30
|
显示全部楼层
本帖最后由 dhygritek 于 2016-7-20 14:14 编辑
解决了!参考了本网站的帖子,在修改的时候不明白,改错了,已经改正了!
谢谢大家!
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
|
|