Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Unasked Question is the Dumb Question (http://www.go4expert.com/forums/unasked-question-dumb-question-t8659/)

Lennie 5Feb2008 15:40

Unasked Question is the Dumb Question
 
Itís too long since I did this sort of thing. And the program is
no longer available. Can I make VB do this for me, within MS
Word for Windows. (Office 2000 on w2kp)

Roughly speaking, Iím seeking to extract data from a data source,
more or less like the following:

Bracketed words signify <field name>

IF <keyword> contains (the word) 'redundant' [true response]
skip to next record (and repeat that test [for every record!])

Should that above conditional test return a [false response]
then, extract the data from the record, thus:

Insert <name1> data in bold, followed by a tab, then move
to the next field.

IF <name2> contains data, insert that data, followed by a
comma and a space, ELSE IF <name2> contains no data,
skip to next field.

. . . . . . . . .

If <home_tel> contains data, insert the text string "Home
Tel:" in bold, then the field data, followed by a comma and a
space, ELSE IF <home_tel> contains no data, skip to next
field.

On and on and on . . . . till the end-of-record, [where two
carriage returns are inserted] then move to the next record
until end of file. (Ye olde WHILE WEND instruction?)

The desired outcome of this exercise is a WP file printed on
A5, (or two columns on A4 landscape) for inclusion in a
small diary/ring-binder.

The data source has 26-30 fields per record and less than
1k records.

Perry <sighs>


All times are GMT +5.5. The time now is 13:28.