Trying to Compose and save in one button, but it is not working right

The users have a button that requires them to click on to move a document from one person to another. Once the button is clicked it is supposed to create a new document and save it.

But it is not saving the new document unless they click on Save and Close. ??

What am I missing … Sorry if this sounds stupid.

Call uidoc.FieldSetText(“Signature”,EmployeeName)

'Save old time sheet - submit to Manager

Call uidoc.save	

'Create new time sheet

depart = uidoc.FieldGetText("Department")

Call ws.ComposeDocument("","","WeekTime")	

Call weekDate.AdjustDay(6)	

TimeEnd = weekDate.LSLocalTime

Call doc.Save(True,True)

Call uidoc.save

Call uidoc.close

Subject: Trying to Compose and save in one button, but it is not working right

Neither the doc nor the uidoc variables are being set to the new document. Once you create the new document, you need to assign it to the variables in order to save it.

Subject: RE: Trying to Compose and save in one button, but it is not working right

Thank you - I knew it was something stupid

HAPPY HOLIDAYS !