Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Copying text from one document section to another...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ML - 15 Feb 2005 17:41 GMT
Is there a way to copy text that a user types from one section of a document
to others?

Basically I need a way to copy the text the user enters into a summary
section, into a table that is at the end of the document.  This is filing
sheet that includes the summary as the meta data for logging the document.
I want to copy the full text from one section and place it in another.

Is there someway to mark the text so that a macro or similar can then
reference and copy it, formatting and all to another document section?
Jonathan West - 15 Feb 2005 17:51 GMT
> Is there a way to copy text that a user types from one section of a
> document to others?
[quoted text clipped - 6 lines]
> Is there someway to mark the text so that a macro or similar can then
> reference and copy it, formatting and all to another document section?

Hi ML,

Mark the text to be copied with a bookmark. Then add a REF field referencing
the bookmark at the end of the document

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

ML - 15 Feb 2005 18:20 GMT
Thanks.  Sorry for the cross posting, wasn't sure where this applied best.

Is there anyway to protect a bookmark or have it inserted via a macro around
selected text?  Want to control its naming so that it is properly referenced
where needed.

>> Is there a way to copy text that a user types from one section of a
>> document to others?
[quoted text clipped - 12 lines]
> Mark the text to be copied with a bookmark. Then add a REF field
> referencing the bookmark at the end of the document
Jonathan West - 15 Feb 2005 18:32 GMT
> Thanks.  Sorry for the cross posting, wasn't sure where this applied best.
>
> Is there anyway to protect a bookmark or have it inserted via a macro
> around selected text?  Want to control its naming so that it is properly
> referenced where needed.

You can't protect a bookmark, though you can make it harder for it to be
accidentally deleted, for instance by applying a bookmnarks to a whole
table.

You can use VBA to apply a bookmark with a predefined name to the current
selection very easily, like this

ActiveDocument.Bookmarks.Add Name:="MyBookmark", Range:=Selection.Range

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

ML - 15 Feb 2005 18:36 GMT
Thanks I got it working.  I just made a macro to bookmark the selected text.
That way the user can type the info and mark it and I can reference.

Thanks for your help!

>> Thanks.  Sorry for the cross posting, wasn't sure where this applied
>> best.
[quoted text clipped - 11 lines]
>
> ActiveDocument.Bookmarks.Add Name:="MyBookmark", Range:=Selection.Range
Dave Lett - 15 Feb 2005 17:56 GMT
Hi ML,

Instead of copying it, you could bookmark the summary section an include a
{ REF } field to capture the text.

HTH,
Dave

> Is there a way to copy text that a user types from one section of a document
> to others?
[quoted text clipped - 6 lines]
> Is there someway to mark the text so that a macro or similar can then
> reference and copy it, formatting and all to another document section?
ML - 15 Feb 2005 18:06 GMT
Thanks.  Is there someway I can do this easily via a menu or macro?  I need
to make this as simple as possible for the user who may not be a word
expert.  I also need to ensure that the ref field is in place in the other
section within the template so the user does not have to insert a ref
themselves.

Ideally the user would enter the text in a pretagged area or tag it with a
menu item after typing it and then it automatically appear in the other
section on a field update or similar.

> Hi ML,
>
[quoted text clipped - 16 lines]
>> Is there someway to mark the text so that a macro or similar can then
>> reference and copy it, formatting and all to another document section?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.