Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating bookmarks with vba problem

Status
Not open for further replies.

a228380

MIS
May 21, 2004
24
US
I am populating 10 bookmarks in ms word for xp from an excel for xp spreadsheet. When I step through the vba macro the word document populates all 10 book marks per document. When I allow the macro to run unattended it will intermitently miss book marks that require population. It is not consistant on which bookmark it will miss. On multiple runs sometimes it misses bookmarks in word doc 1, other times doc 7 other times doc 2, etc...

I have run it multiple times to ensure it is random on what bookmarks it misses and when they are missed.

I am not sure If I need to delay after pasting and if so how is this done.

has anyone seen anything like this?

thanks in advance
 
hi anne

thanks for responing, vba macros is no way my area of expertise.

I think the mail merge would work if I was just needed tgo produce the document and send it along, but after the form is completed by the reciepiants it is returned and the data is extracted.

more detail on the process
the form is a review.
we populate bookmarks 1-8 with normal employee info (name, number, title etc) with a macro out of the employee database
the form goes to the employee they populate book marks 9-20 which are scores along with a bunch of writing for my purpose is irrelevant
the form then goes to the manager they populate book marks 21 -30 with scores also along with a bunch of comments also irrelevant for my purposes

the final form is returned and a macro runs that reads the bookmarks and puts all of the results back into teh employee database.

this process saves time for hr department both in producing the original form and reading the results.

I can supply a sample of the code if you would like to review it.

thanks in advance
al
 
Well, I don't do code, really, but there's a great Word coder at my new site.

Anyway, here's my thinking.
I'd run the mail merge.
Then I'd run code that adds fields 9 through 30, etc., to a given location in each merge doc. You could do this AFTER you run code that breaks the docs up into individual docs, by Cindy Meister:


Then you run the code that adds the rest of the form to each doc and protects it, and even emails it to the party...

??

I'm thinking you'll be happier that way.


Anne Troy
VBA Coders, please help:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top