Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2013, 10:45 PM
fumei fumei is offline Data migration between two templates Windows 7 64bit Data migration between two templates Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

I don't know if this helps, but say you have:

FF_Doc_A.doc has x formfields (x = any number)
FF_Doc_B.doc has x formfields

FF_Doc.B formfield names match EXACTLY the names in FF_Doc_A. The results of the formfields in B becomes equal to the results of the identically named formfields in A. For the code below, the ActiveDocument is FF_Doc_A, and FF_Doc_B is open (i.e. in the Documents collection).


Code:
Option Explicit
Sub CopyStuff()
Dim docFF As FormFields
Dim oFF As FormField
Dim strTempName As String
Set docFF = ActiveDocument.FormFields
For Each oFF In docFF
   strTempName = oFF.Name
   Documents("FF_Doc_B.doc").FormFields(strTempName).Result = _
         oFF.Result
Next
End Sub
N.B. to be proper code, the above needs testing for type of formfields. Dropdown fornfields will fail (but the code can be altered to make them work). It works best for text formfields. It is only to give you an idea.
Reply With Quote
Reply

Tags
data migration, templates



Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Data Source- Linking template charts to new data lbf PowerPoint 0 10-28-2011 12:19 PM
Data migration between two templates Address Book migration problem... DeMarcos Outlook 1 06-16-2010 06:22 AM
Migration of Office 2003 License (re-activation) dbabic Office 0 11-19-2009 09:54 AM
Problems with Migration and Rules Wizard RealtyConnect Outlook 0 04-23-2008 11:18 PM
Outlook 2000 SR1a Auto-Resolve Change after EX2K3 Migration Richard McConnell Outlook 0 02-02-2006 12:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 PM.


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