![]() |
#1
|
|||
|
|||
![]() I'm trying to do something similar to https://www.msofficeforums.com/word-...nt-header.html (at least it sounds similar) and also running into the same type of problems. I have userform that pops up when the template is opened but the command button leads to runtime error 5941 Code:
Private Sub CommandButton1_Click() With ActiveDocument .Bookmarks("Text1").Range.Text = TextBox1 .InsertBefore TextBox1 .Bookmarks("Text2").Range.Text = TextBox2 .InsertBefore TextBox2 End With UserForm1.Hide End Sub Code:
Sub autonew() ' ' autonew Macro ' ' UserForm1.Show End Sub Last edited by macropod; 07-29-2015 at 05:55 PM. Reason: Split from unrelated thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
marksm33 | Word VBA | 3 | 01-15-2015 07:55 PM |
![]() |
saltlakebuffalo | Excel Programming | 1 | 02-10-2014 11:01 PM |
Repeating Bookmark Text | BECKTHOMO | Word | 1 | 03-27-2012 08:34 PM |
![]() |
skarden | Word | 1 | 12-12-2011 10:39 PM |
![]() |
hklein | Word VBA | 4 | 08-10-2011 04:33 AM |