![]() |
|
#1
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name
|
meghanquint4 | Word VBA | 2 | 02-28-2018 07:12 AM |
| Having Issues Applying a Macro Across Multiple Files. Changes Just Don't Seem To Save. | Kajex | Word VBA | 2 | 09-08-2017 06:37 AM |
Tweak Macro to Save Each Page of Word Document as Separate PDF or Doc File?
|
Hewg74 | Word VBA | 3 | 08-22-2016 05:20 PM |
Can I use the filter function to separate letters into separate files?
|
drhauser | Mail Merge | 2 | 12-14-2011 02:18 PM |
| Any easy way to separate a Word document into separate files? | SamHelm | Word | 0 | 08-21-2010 05:29 AM |