Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2016, 04:13 AM
jayhammond jayhammond is offline struggling with simple task Windows 10 struggling with simple task Office 2016
Novice
struggling with simple task
 
Join Date: Mar 2016
Location: London
Posts: 5
jayhammond is on a distinguished road
Default struggling with simple task

Hello again,

I am struggling with, what should be a simple task.

I would like a text box to type what i type into it, into a bookmarked location

I have searched but can't seem to find what im doing wrong.

I am a complete noob so be kind

My code for the textbox is this.

Private Sub TextBox3_Change()
With ActiveDocument

.Bookmarks("customername1").Range _
.InsertAfter


End With

End Sub
Reply With Quote
  #2  
Old 03-04-2016, 06:11 AM
gmayor's Avatar
gmayor gmayor is offline struggling with simple task Windows 10 struggling with simple task Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Take a look at the FillBM function on my website at http://www.gmayor.com/useful_vba_functions.htm.

As for the 'text box' see http://www.gmayor.com/Userform.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 03-04-2016, 08:19 AM
gmaxey gmaxey is offline struggling with simple task Windows 7 32bit struggling with simple task Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,422
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

By all means see Graham's links.

However, look at your event and look at your code.

1. What do you want to insertafter the bookmark? The text you type? Yes, then:

Bookmarks("customername1").Range.InsertAfter TextBox3.Text


2. Do you really want to insert text after the bookmark every time that text is changed. For example, when you fix the code as shown above and type your name the result is: "JayJaJ"
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #4  
Old 03-04-2016, 08:58 AM
jayhammond jayhammond is offline struggling with simple task Windows 10 struggling with simple task Office 2016
Novice
struggling with simple task
 
Join Date: Mar 2016
Location: London
Posts: 5
jayhammond is on a distinguished road
Default

Thanks for the replies, ill have a look into it!

and no i probly wouldn't want it to look like that haha
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
struggling with simple task Struggling to set A4 Jpg image as Word document background? acknowledged74 Word 2 10-18-2014 01:39 PM
struggling with simple task Copy and Paste of a Task...Including all of the Task's 'children'...to a new task KRTSTARRYNIGHT Project 1 07-01-2014 06:54 AM
struggling with simple task struggling with Excel formula riccam87 Excel 1 05-02-2014 07:21 AM
struggling with simple task Mid-Task resource scheduled 0 hours increasing task duration needlessly DarlaWeber Project 1 01-31-2014 02:30 PM
struggling with simple task Simple Question, difficult task... Jshopping Word 4 01-19-2011 03:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:32 PM.


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