![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
Are you expecting to have both userforms open at the same time? If so, you will need to make them modal.
If the userform reads document variables in order to populate the relevant userform on initialisation then you can simply read the document variables from one file and write them to the other file. For example Code:
Private Sub VariableTransmission() Dim doc1 As Document, doc2 As Document, aVar As Word.Variable Set doc1 = ActiveDocument Set doc2 = Documents.Add doc1.Variables.Add "First", "Hi mum" doc1.Variables.Add "Second", "Hello world" For Each aVar In doc1.Variables doc2.Variables.Add Name:=aVar.Name, Value:=aVar.Value Next aVar Debug.Print doc2.Variables("Second").Value End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UserForm with Combo Box from data in table within template | jhansrod | Word VBA | 6 | 06-13-2019 09:02 AM |
Excel Userform to Word Template Bookmarks | JCrinage | Excel Programming | 1 | 11-02-2016 07:03 PM |
![]() |
kennyD | Word | 4 | 04-07-2015 01:32 PM |
userform to enter multiple lines of data in template | callasabra | Word VBA | 0 | 06-27-2014 05:29 PM |
How to get Outlook 2007 userform into template? | Royzer | Outlook | 0 | 04-13-2012 10:41 AM |