#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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" |
#4
|
|||
|
|||
Thanks for the replies, ill have a look into it!
and no i probly wouldn't want it to look like that haha |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Struggling to set A4 Jpg image as Word document background? | acknowledged74 | Word | 2 | 10-18-2014 01:39 PM |
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 Excel formula | riccam87 | Excel | 1 | 05-02-2014 07:21 AM |
Mid-Task resource scheduled 0 hours increasing task duration needlessly | DarlaWeber | Project | 1 | 01-31-2014 02:30 PM |
Simple Question, difficult task... | Jshopping | Word | 4 | 01-19-2011 03:04 PM |