![]() |
#1
|
|||
|
|||
![]()
Hi
I have this macro for a command button in my template to save a form (word document when i open the template) after completion of the form. But i encountered run time error 4198 when i tried to run this in the word document generated from the template. Any help is appreciated. Thanks. Code:
Private Sub SaveAsPDF_Click() With Application.FileDialog(msoFileDialogSaveAs) .FilterIndex = 3 .Show If .SelectedItems.Count <> 0 Then ThisDocument.SaveAs2 .SelectedItems(1), wdFormatDocument End If End With End Sub Last edited by elaineAda; 05-05-2022 at 06:32 AM. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cant save document as docx or doc using macro in Word 2007 | staicumihai | Word VBA | 1 | 04-27-2018 10:59 AM |
![]() |
Library Worker | Word | 5 | 01-27-2016 09:40 AM |
![]() |
Tomc29 | Word | 9 | 06-10-2015 03:04 AM |
![]() |
Mhangoy | Word | 6 | 09-06-2013 06:57 AM |
![]() |
the_lil | Word | 5 | 10-27-2011 08:41 AM |