Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2012, 03:04 PM
kent kent is offline VBA to copy bookmark to a new location Windows XP VBA to copy bookmark to a new location Office 2007
Novice
VBA to copy bookmark to a new location
 
Join Date: Jan 2006
Posts: 4
kent
Default VBA to copy bookmark to a new location

Hi,



I am trying to reference a bookmark in another location, but want this to occur immediately after the text is input. I know 2007 can do this very easily, but I am forced to use 2003 due to large user based having mixed versions, and some other VBA code that I do not want in a macro enabled file. (needs to be a doc file)

I have run the google gambit and have tried forms, fields, etc. some of these are suppose to work, but I can not get this to reference immediately.

Can anyone think of a simple VBA solution for this, that when text is input into a table cell (bookmarked), it will immediately copy this to another bookmark location?
Reply With Quote
  #2  
Old 06-13-2012, 08:02 PM
macropod's Avatar
macropod macropod is online now VBA to copy bookmark to a new location Windows 7 64bit VBA to copy bookmark to a new location Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Kent,

If you want the data replicated, why aren't you simply cross-referencing the first location's bookmark?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-14-2012, 06:02 AM
kent kent is offline VBA to copy bookmark to a new location Windows XP VBA to copy bookmark to a new location Office 2007
Novice
VBA to copy bookmark to a new location
 
Join Date: Jan 2006
Posts: 4
kent
Default

I want it to copy immediately, rather than having to perform an action (e.g. Print preview)

My understanding is that cross referencing does not fire immediately.
Reply With Quote
  #4  
Old 06-14-2012, 06:14 AM
macropod's Avatar
macropod macropod is online now VBA to copy bookmark to a new location Windows 7 64bit VBA to copy bookmark to a new location Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A Print Preview is unnecessary. Since you're using vba, all you need to update all cross-references in a document is a single .Fields.Update command.

Furthermore, if you were to be inputting data manually into a formfield whose 'calculate on exit' property is checked, any cross-references to the formfield's internal bookmark would update immediately the formfield is exited without the need for any code at all.

For more information on data replication in Word, see: http://gregmaxey.com/word_tip_pages/repeating_data.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 06-14-2012, 12:22 PM
kent kent is offline VBA to copy bookmark to a new location Windows XP VBA to copy bookmark to a new location Office 2007
Novice
VBA to copy bookmark to a new location
 
Join Date: Jan 2006
Posts: 4
kent
Default

Form and Ref works well, but I can not have the document protected and locked.
The document is a 15 page template, that requires sections to be filled in/pasted etc.

This referencing is just to save people some time so they don't have to fill-in the same data multiple times.
Reply With Quote
  #6  
Old 06-14-2012, 02:18 PM
macropod's Avatar
macropod macropod is online now VBA to copy bookmark to a new location Windows 7 64bit VBA to copy bookmark to a new location Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In that case, simply use cross-referencing and the .Fields.Update command.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to copy bookmark to a new location VBA to copy bookmark-hyperlinks to plain text strings Marrick13 Word 2 04-29-2012 05:12 AM
VBA to copy bookmark to a new location VBA to insert Bookmark rockwellsba Word VBA 2 05-31-2011 01:07 AM
Bookmark Classification DrDoom Word 0 06-29-2010 07:08 AM
copy a file which does not have copy option jkind Word 0 01-17-2010 09:25 AM
Bookmark to another document spqr Word 3 06-26-2009 04:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:02 AM.


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