Please help with text box to word bookmark 
Author Message
 Please help with text box to word bookmark

Hi All

Sorry only me again!

I have a biggy one this time that is really baffalling me.

I want to be able to enter in words, numbers etc.. in my vb programs text
box,   then i want vb to put them to go into a MS word document.

I know how to setup a textbox in vb, and i know how to setup a msword doc
with a bookmark,.   however i am missing the link
on how to tell vb to enter in the text to the word.doc bookmark.

jsut for example,  if my doc was c:\word\vbprogram.doc  and the bookmark was
"vbwords" what would the code be ?

I am sure it can be done,  does anyone know how ?

Many Thanks!

Mark.



Fri, 06 Aug 2004 23:52:19 GMT  
 Please help with text box to word bookmark
Answered in microsoft.public.word.word97vba.

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word


Quote:
> Hi All

> Sorry only me again!

> I have a biggy one this time that is really baffalling me.

> I want to be able to enter in words, numbers etc.. in my vb programs text
> box,   then i want vb to put them to go into a MS word document.

> I know how to setup a textbox in vb, and i know how to setup a msword doc
> with a bookmark,.   however i am missing the link
> on how to tell vb to enter in the text to the word.doc bookmark.

> jsut for example,  if my doc was c:\word\vbprogram.doc  and the bookmark was
> "vbwords" what would the code be ?

> I am sure it can be done,  does anyone know how ?

> Many Thanks!

> Mark.



Sat, 07 Aug 2004 00:32:53 GMT  
 Please help with text box to word bookmark

In VBA, you would do this with a userform, and the relevant code would
usually live in the Click event of the button that dismisses the form
(typically the "OK" button).  Assuming the textbox control is TextBox1,
the code would be:

  Private Sub cmdOK_Click
  ActiveDocument.Bookmarks("vbwords").Range.InsertAfter TextBox1.Text
  Unload Me
  End Sub

This group is about VBA, not VB, so whether the code above translates
seamlessly to VB, I couldn't say.  If this gets you nowhere, you may
want to ask this question in a VB group.


-- See the MVP FAQ at http://www.mvps.org/word --------------------------
----------------- "Life is nothing if you're not obsessed." --John Waters
-------------------------------------------------------------------------
Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.

Quote:

> Hi All

> Sorry only me again!

> I have a biggy one this time that is really baffalling me.

> I want to be able to enter in words, numbers etc.. in my vb programs text
> box,   then i want vb to put them to go into a MS word document.

> I know how to setup a textbox in vb, and i know how to setup a msword doc
> with a bookmark,.   however i am missing the link
> on how to tell vb to enter in the text to the word.doc bookmark.

> jsut for example,  if my doc was c:\word\vbprogram.doc  and the bookmark was
> "vbwords" what would the code be ?

> I am sure it can be done,  does anyone know how ?

> Many Thanks!

> Mark.



Sat, 07 Aug 2004 10:57:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Please help with text box to Word bookmark problem

2. Word 2K Add text to bookmarks using Input Box

3. Please Help - Word Count in a Text Box

4. using VB text boxes data but not text boxes in word 2000

5. how do you make text goto the next line in a text box,please help

6. Wordwrap the text line in a text box, please help

7. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

8. WORD bookmark not printing VB text only on some PC's

9. Find and bookmark text while Word is not visible

10. WORD bookmark text not printing from VB only on certain PC's

11. Inserting Bookmarks and Text into a Word Document

12. Populate drop down with text from bookmarks in Word VBA

 

 
Powered by phpBB® Forum Software