Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-29-2015, 05:32 PM
tddfs tddfs is offline Send Userform Text to Bookmark Windows 7 32bit Send Userform Text to Bookmark Office 2007
Novice
Send Userform Text to Bookmark
 
Join Date: Jul 2015
Posts: 3
tddfs is on a distinguished road
Default Send Userform Text to Bookmark


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
I've been using a macro to open the userform.

Code:
Sub autonew()
'
' autonew Macro
'
'
UserForm1.Show
End Sub
Any help would be appreciated.

Last edited by macropod; 07-29-2015 at 05:55 PM. Reason: Split from unrelated thread
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Send Userform Text to Bookmark Moving Selected Items from a Multiselect Listbox on a userform to a bookmark in Word marksm33 Word VBA 3 01-15-2015 07:55 PM
Send Userform Text to Bookmark send a string from Excel UserForm to Word saltlakebuffalo Excel Programming 1 02-10-2014 11:01 PM
Repeating Bookmark Text BECKTHOMO Word 1 03-27-2012 08:34 PM
Send Userform Text to Bookmark Word 2003 - IncludeText Does Not Include Bookmark Text if in a Form Text Control skarden Word 1 12-12-2011 10:39 PM
Send Userform Text to Bookmark delete all bookmark text hklein Word VBA 4 08-10-2011 04:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft