Andy Lacey
andy at minstersystems.co.uk
Fri May 14 10:40:10 CDT 2004
Not on I'm afraid Christian. It's not just a case of popping in one of two values. It's a case of saying if x=n and y=nn then print this paragraph, if x=n and y=nn+1 print this one, if x=n+1 etc etc. If it could even be done with an IIF it would be horrendous, and the users would never be able to edit the wording which is one of the requirements. Thanks anyway. Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: Access Developers discussion and problem solving <accessd at databaseadvisors.com> To: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com> Subject: RE: [AccessD] Help With Word Basic Date: 14/05/04 14:29 > > Try using field codes with an if and include statements like this. > > { IF { MERGEFIELD fldChoice } ="N" "Statement if True" "Statement if > False"} > > Christian Brock > > > > > -----Original Message----- > From: Andy Lacey [mailto:andy at minstersystems.co.uk] > Sent: Friday, 14 May 2004 10:43 > To: Dba > Subject: [AccessD] Help With Word Basic > > > I justify posing this here on the tenuous grounds that it is VBA and it's > probably of interest to others who have Access systems that interface to > Word. > > I have a mailmerge system running nicely to produce quotations. What I want > to do now is vary one of the paragraphs according to two criteria. The > alternative paras still need to be held in Word so that the user can easily > alter and can format them. These paras also contain one or two merge fields. > My solution, which I though reasonably elegant, was to set up a new doc > specifically for these alternative paragraphs with a table containing 3 > columns and several rows. The first column is purely descriptive. The second > and third columns hold versions of the text. So what I can do is calculate a > column and a row index from my data and pick the appropriate cell in the > table. So far so pretty good. But then we encounter the horrors of Word > Basic. What I've managed to achieve is opening the doc, and pointing a > Selection object at the cell. But how to get the contents of that cell into > my main doc? If I use the Copy method what gets copied to the clipboard is a > complete cell not just its contents, and pasting it back brings in a > single-cell table complete with border and formatted accordingly. But I only > want to copy the cell contents. I can do it manually but can't for the life > of me see how to do it in code. The selection object has a Text property, > but you can't Copy that, and even if you could I don't know what that would > do with the embedded merge field. Can someone (Bryan for example?) help? > Where am I going wrong. I always have this kind of trouble with Word Basic, > it's a nightmare unless you've got an example to work from. > > -- > Andy Lacey > http://www.minstersystems.co.uk > > > > > ________________________________________________ > Message sent using UebiMiau 2.7.2 > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2