I have a macro to save the current document in a word document, but i need help to write a macro to at the same time save the last page or the last 2 pages of the current document as either a word document or an excel worksheet. I also need help to export the content of certain content control into excel spreadsheet while saving the file, but I really do not know how to include in this code. Thanks. Any help is appreciated.
Code:
Private Sub CommandButton1_Click()
CommandButton1.Select
Selection.Delete
With Application.FileDialog(msoFileDialogSaveAs)
.FilterIndex = 3
.Show
If .SelectedItems.Count <> 0 Then
ActiveDocument.SaveAs2 .SelectedItems(1), wdFormatDocument
End If
End With
End Sub