please want word macro save file number in table "that number change every document " example want file name " lifting 1555" , next document "lifting 1556" , lifting 1557
i make macro save every file type same number!
sub macrosave()
'
' macrosave macro
'
'
selection.moveright unit:=wdcell
selection.copy
changefileopendirectory "c:\users\nagy\desktop\0\"
activedocument.saveas2 filename:="1555 lifting.docx", fileformat:= _
wdformatxmldocument, lockcomments:=false, password:="", addtorecentfiles _
:=true, writepassword:="", readonlyrecommended:=false, embedtruetypefonts _
:=false, savenativepictureformat:=false, saveformsdata:=false, _
saveasaoceletter:=false, compatibilitymode:=14
end sub
dim rngfilename string
with activedocument
set rngfilename = .tables(1).cell(1, 4).range
rngfilename.end = rngfilename.end - 1
.saveas "c:\users\nagy\desktop\0\" & rngfilename.txt & " lifting"
end with
how documents being created? depending upon answer there might better way.
Office / Word / Windows other / Office 2010
Comments
Post a Comment