[算表] 使用VBA另存新档时的作者

楼主: kcyy (嫑槑)   2018-10-01 16:51:56
软件:Excel
版本:2010
如下是在搜寻网页上分享储存分页的程式码,
存下来的档案,"作者"跟"上次修改者"都会变成最后操作档案的人员
是否有办法让"作者"变成原EXCEL档案的作者,"上次修改者才变成最后操作档案的人员?
或者必须要在使用VBA插入新分页的时候就进行调整?
档案原作者为A,B使用此档案宏新增与储存分页后,
将存下来的档案"作者"显示为A,"上次修改者"显示为B
谢谢
Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
xWs.Copy
Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name &
".xls"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
作者: newacc (XD)   2018-10-01 17:30:00
可用BuiltinDocumentProperties("Author")取得或修改作者Application.ActiveWorkbook.[...]=ThisWorkbook.[...]把这句放在SaveAs前面,[...]就是1F的那串,这样试试
作者: soyoso (我是耀宗)   2018-10-01 17:59:00
取得上可以thisworkbook.author修改以activeworkbook.author = thisworkbook.author
楼主: kcyy (嫑槑)   2018-10-02 09:53:00
感谢楼上两位大神协助,谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com