Document with rotating information

Q

Quanda Hood

I have no idea where to start so I am hoping someone here could give me some
direction. What is the best way to create a word document that changes the
Realtor Appraiser based on a numbered list. In other words, each time a user
opens the document form the next appraiser in a list would populate a
field(?) perhaps. So if Acme Appraisals is 1, Joe's Appraisals is 2 and
Jane's Appraisals is 3; the first the form is opened it would read something
like Appraiser: Acme, then the next time Appraiser: Joe, then the next time
Appraiser: Jane, the the next time Appraiser: Acme, and so on. Could a
macro do what I am asking?

Basically it is a banks request to have a random selection of appraiser that
is out of the hands of our employees so that no one appraiser can be
continuously used because perhaps they appraise home values high. We have
written this into a requirements agreement with the bank so I have to find a
solution. Also, if anyone feels Word is not the best solution perhaps you
can just indicate that and I will move to a different discussion area. Thank
you!
 
G

Greg Maxey

You could do that with a macro, but simply rotating between three appraisers
is random at all. Better might be a random number generator:

Sub AutoNew()
Dim myValue As Long
Dim oRng As Word.Range
Set oRng = ActiveDocument.Bookmarks("Appraiser").Range
myValue = Int((3 * Rnd) + 1) 'Generate random value between 1 and 3.
Select Case myValue
Case 1
oRng.Text = "Acme Appraisals"
Case 2
oRng.Text = "Joe's Appraisals"
Case 3
oRng.Text = "Jane'e Appraisals"
End Select
ActiveDocument.Bookmarks.Add "Appraiser", oRng
End Sub

Place a bookmark titled "Appraiser" in the template.


Quanda said:
I have no idea where to start so I am hoping someone here could give
me some direction. What is the best way to create a word document
that changes the Realtor Appraiser based on a numbered list. In
other words, each time a user opens the document form the next
appraiser in a list would populate a field(?) perhaps. So if Acme
Appraisals is 1, Joe's Appraisals is 2 and Jane's Appraisals is 3;
the first the form is opened it would read something like Appraiser:
Acme, then the next time Appraiser: Joe, then the next time
Appraiser: Jane, the the next time Appraiser: Acme, and so on.
Could a macro do what I am asking?

Basically it is a banks request to have a random selection of
appraiser that is out of the hands of our employees so that no one
appraiser can be continuously used because perhaps they appraise home
values high. We have written this into a requirements agreement with
the bank so I have to find a solution. Also, if anyone feels Word is
not the best solution perhaps you can just indicate that and I will
move to a different discussion area. Thank you!

--
Greg Maxey

See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.

"It is not the critic who counts, not the man who points out how the
strong man stumbles, or where the doer of deeds could have done them
better. The credit belongs to the man in the arena, whose face is
marred by dust and sweat and blood, who strives valiantly...who knows
the great enthusiasms, the great devotions, who spends himself in a
worthy cause, who at the best knows in the end the triumph of high
achievement, and who at the worst, if he fails, at least fails while
daring greatly, so that his place shall never be with those cold and
timid souls who have never known neither victory nor defeat." - TR
 

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