Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 07-14-2015, 07:22 AM
macropod's Avatar
macropod macropod is online now Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by shabbaranks View Post
Whats happening now is if I open the document I am prompted to insert the job number (it asks me a few times) and then when it stops the job number is empty and the other fields relate to a completely different job number
The multiple prompts suggests either:
• you have have more than one FILLIN field in the document; and/or


• you are using a Word template rather than a mailmerge main document.
You should also have a space after the '<>' in the SKIPIF field.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #17  
Old 07-14-2015, 07:48 AM
shabbaranks shabbaranks is offline Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2007
Advanced Beginner
Populating a Word document with VBA\SQL
 
Join Date: Mar 2011
Posts: 89
shabbaranks is on a distinguished road
Default

I give up its not working.... No matter how I add the fields the prompt doesn't populate the job field and the results seem to stay the same (a previous entry not updating).

To test if there was more than 1 FILLIN I deleted it and it didn't prompt me so I know there wasn't. I guess my faith in Word isn't restored
Reply With Quote
  #18  
Old 07-14-2015, 03:03 PM
macropod's Avatar
macropod macropod is online now Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

If you can attach the actual document to a post I'll take a look at it. Also, how are your job #s formatted?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #19  
Old 07-14-2015, 11:39 PM
shabbaranks shabbaranks is offline Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2007
Advanced Beginner
Populating a Word document with VBA\SQL
 
Join Date: Mar 2011
Posts: 89
shabbaranks is on a distinguished road
Default

Hi,

Thanks that would be ideal, the job numbers are 5 digit numbers so for example 10310.

File attached appreciate your help
Attached Files
File Type: docx SST-NCRN-000024.docx (97.1 KB, 10 views)
Reply With Quote
  #20  
Old 07-15-2015, 12:17 AM
macropod's Avatar
macropod macropod is online now Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

OK, the reason you're getting the prompt for every record is that you have omitted the closing double-quotes before the \o switch in your FILLIN field. Hence the switch doesn't work. You have:
{ SKIPIF{ MERGEFIELD Job } <> {FILLIN "What Is The Job Number?\o}}
instead of:
{ SKIPIF{ MERGEFIELD Job } <> {FILLIN "What Is The Job Number?" \o}}

As for the job Nos., the only issue I can see is if they have leading 0s. In that case you should re-code the SKIPIF field as:
{ SKIPIF{ MERGEFIELD Job \# 00000} <> {FILLIN "What Is The Job Number?" \# 00000 \o}}

Note also that your 'Job Number' cell won't get populated unless you have a copy of the Job MERGEFIELD there, outside the SKIPIF field. Personally, I'd prefer to keep the SKIPIF field above the table, too.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #21  
Old 07-15-2015, 01:41 AM
shabbaranks shabbaranks is offline Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2007
Advanced Beginner
Populating a Word document with VBA\SQL
 
Join Date: Mar 2011
Posts: 89
shabbaranks is on a distinguished road
Default

Again Ive tried this and its not working - The { MERGEFIELD Job } seems to have a mind of its own even though I have separated it from the SKIPIF - frustrating or what

Image 1


Image 2


Image 3


I cant see why its not working?
Reply With Quote
  #22  
Old 07-15-2015, 02:38 AM
macropod's Avatar
macropod macropod is online now Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

I don't understand why it wouldn't be working. I tried the exact same setup using your document and a dummy Excel data source and everything works fine.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #23  
Old 07-21-2015, 06:57 AM
shabbaranks shabbaranks is offline Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2007
Advanced Beginner
Populating a Word document with VBA\SQL
 
Join Date: Mar 2011
Posts: 89
shabbaranks is on a distinguished road
Default

Is there an easy way to get copy merge field property into a document property?
Reply With Quote
  #24  
Old 07-21-2015, 01:31 PM
macropod's Avatar
macropod macropod is online now Populating a Word document with VBA\SQL Windows 7 64bit Populating a Word document with VBA\SQL Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

No. Aside from which, nothing in this thread indicates why that would be necessary.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating Data in New TABs? Sueade Excel 2 06-02-2015 09:12 PM
Mail Merge Field Not Populating JennEx Mail Merge 3 05-10-2015 09:30 PM
Populating a table cell wit document properties milena Word VBA 2 04-15-2015 07:28 AM
Reapting/Populating the same text in Word 2007 akwjaw14 Word 0 06-03-2014 03:40 PM
Populating a Word document with VBA\SQL Need help populating dropdown box antztaylor Word 3 11-06-2012 05:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:50 AM.


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