If stATMENT AND LISTNUM

U

Ucankite2

Hi All, I am trying to create a list in a document that checks the content of a field in my external database and if the answer is yes, it types a phrase...thats the easy bit, i have created an IF statement that says if field = yes "the phrase" "" This works great and I have loads of these and it creates a nice list for me. My problem is i want to then number the resulting list. I have tried using another IF and the Listnum but cant get it to work..... HElp me i'm going mad
 
D

Doug Robbins - Word MVP

It would be easier to advise if you had posted the code that you are using,
but how about declaring a variable to be used as a counter, set it initially
to 1 and insert it followed by a vbTab before each phrase, incrementing the
variable by 1 each time.

Dim itemnum as long
Set itemnum = 1

[your code]

[ ].Range.InsertBefore itemnum & vbTab & [your phrase
itemnum=itemnum+1

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

Insert a { SEQ } field in each { IF } field construction as follows:

{ IF { MERGEFIELD f_c_Case_PROB_10 } = "Yes" "{ SEQ Num } Original Will."
"" }

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top