Retrieving userform info into a document

J

Jason Logue

Hey, I posted this at the vba for beginners list, but I am
going to post it here just in case. Plus, I am just
putting the basics down.

This code retrieves bookmarked information and puts it in
the textbox located on a userform:
UserForm2.TextBox17.Text = source.Bookmarks
("Chapter3_1").Range

This code is in a series of userforms, but the user would
like to use this function when not using the userforms.
They would like to click a button on a toolbar and insert
the same type of information (over 100 bookmarked
sections) into any place where there cursor is located,
specifically if they forgot to insert some information
after they are finished filling out the userforms.

I am not sure how to create code that can retrieve the
same type of information into wherever there cursor is
located. Any help would be much appreciated.

Thanks,
Jason
 
W

Word Heretic

G'day "Jason Logue" <[email protected]>,

stick the code in a public routine. Call this routine from two places:

a) The userform where it is required

b) a stand-alone public macro that can be linked to your toolbar.




Jason Logue said:
Hey, I posted this at the vba for beginners list, but I am
going to post it here just in case. Plus, I am just
putting the basics down.

This code retrieves bookmarked information and puts it in
the textbox located on a userform:
UserForm2.TextBox17.Text = source.Bookmarks
("Chapter3_1").Range

This code is in a series of userforms, but the user would
like to use this function when not using the userforms.
They would like to click a button on a toolbar and insert
the same type of information (over 100 bookmarked
sections) into any place where there cursor is located,
specifically if they forgot to insert some information
after they are finished filling out the userforms.

I am not sure how to create code that can retrieve the
same type of information into wherever there cursor is
located. Any help would be much appreciated.

Thanks,
Jason

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If my answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top