Reply
 
Thread Tools Display Modes
  #1   Report Post  
corquando corquando is offline
Junior Member
 
Posts: 2
Default Word merge keeps old fields

Howdy, Word-world.

MSOffice 2007, XP Pro OS.


Here's one I haven't even seen before. I don't know if it's a Word issue or Excel issue, so I'm wallpapering, here and at Mr.Excel.com.

I have a VBA program in Excel that opens a Word doc, links it to an Excel worksheet and merges. So far, kindergarten stuff.

Since I have a number of different types of docs I produce daily, each with its own set of data fields, the page I link to is populated with data particular to one style of doc, linked, merged and then deleted after the production run. Then a new page is added in the same spot, given the same name and a different set of data fields and data are loaded in.

As well, I open a new Word.App for every different source page (Set AppWd = CreateObject("Word.Application")) and then quit after each type so it's also gone.

I do that so that I don't have 17 different merge codes with one variable unique to each. Populating one sheet and running the same code is a whole lot more efficient.

Up until yesterday this worked fine - for, like, years. Then, for some reason, out of the blue, now when I open and start to process a new doc, it tries to link to the old field set, even though that page was deleted and a new one added and populated.

So, since it quits, the application should unlink but it doesn't . . . ?

Additional weirdness: When I manually open one of the docs, it tries to link to the old source page fields, regardless of whether it is the type that was last run successfully or not. This is true even after having the desktop shut down overnight.

MORE additional weirdness: If I manually Save the Excel workbook after repopulating the source page, then manually Open a new Word doc, it links fine. Sometimes I have to open the Existing Source table, sometimes not, but it always links up.

BUT . . . that doesn't work when I do an "ActiveWorkbook.Save" in the VBA code after each new source page population.

Makes my brain hurt.



Thanks to all.

Last edited by corquando : November 23rd 11 at 02:54 PM Reason: Options update
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007 Mail Merge Labels skips fields using update fields Dianne Griffin Mailmerge 3 August 8th 08 03:59 PM
2007 Merge Fields (database) lock fields after selection VBA Summer Microsoft Word Help 0 September 20th 07 11:31 AM
Insert merge fields button doesn't show fields. Spin Dryer Mailmerge 5 September 27th 06 07:02 AM
MS Word form fields versus mail merge fields [email protected] Mailmerge 4 March 4th 06 05:31 PM
Form fields versus mail merge fields [email protected] Microsoft Word Help 2 February 16th 06 02:12 PM


All times are GMT +1. The time now is 10:39 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"