![]() |
#1
|
|||
|
|||
![]()
I have a word template with an Userform that an user must fill and then click on OK to copy all the data in the fields from the userform into bookmarks... that part is working...
My issue is... once all the data in transferred with the click function for the OK button I have the unload me command to close the user form... then in the userform_terminate function I have the Following: Private Sub UserForm_Terminate() Dim strFileName As String Dim StrPath As String provide default filename StrPath = "c:\temp\test.docx" With Dialogs(wdDialogFileSaveAs) .Name = StrPath If .Display <> 0 Then strFileName = .Name Else ' strFileName = "User Cancelled" End If End With MsgBox strFileName End Sub What I am trying to do is that after I click on OK and all the data is copied in the bookmarks. Then I want the save as dialog to pop up with a predetermined name from the textboxes in the userform... The issue is.. after I click on Ok and the userform is closed.. the Popup Save As dialog appears... I save it... then the data is copied to the bookmarks in the word document... however #1 the document does not get saved and the title of the work document does not change either.. is like the save as dialog did not execute even though it looks like it does... Any help will be appreciated. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2007 prompting to save attachments when they have been closed for hours | Bamlaw | Outlook | 0 | 09-06-2012 03:13 PM |
Question on userform and doc interaction | icecode | Word | 3 | 08-01-2012 08:41 AM |
Please help ...... Outlook 2010 closes when VCard is closed | virajithasarma | Outlook | 0 | 09-21-2011 02:09 AM |
![]() |
Taras49 | Word | 1 | 01-30-2011 02:12 PM |
Outlook userform validation help | aiwnjoo | Outlook | 0 | 12-08-2010 12:57 AM |