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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop in WORD with same cells in differents sheets

Status
Not open for further replies.

congelator

Instructor
Nov 10, 2002
15
0
0
CH
Hi everybody,

I need you help :
I made a userform with 5 fields (name - firstname - city...). When we click on "OK", the informations are moved in cells in WORD, at the right bookmarks (name with NAME bookmark, firstname with FIRSTNAME bookmark,...). Everything is going well with only one record. But, how can I do with many records because I MUST send these informations each time in a similar sheet AND in the same ordrer I wrote them ? I could copy and paste the sheet but it takes the same bookmarks and at the end, I have the same name written in each names cell of the sheets.

As I know that my English is not very good, I try to give you an exemple :

1st record : Name A / Fristname AA / ...
Msgbox "More people ?"
No = informations in Word - END - No problem !
Yes = Informations in Word
WORD - sheet 1 - cell 1 = Name A
WORD - sheet 1 - cell 2 = Firstname AA
...
2nd record - Back to userform - Name B/ Fristname BB/ ...
MSgbox "More people ?" - Beginning of my problem...!!!
Informations in Word
What I need :
WORD - sheet 1 - cell 1 = Name A
WORD - sheet 1 - cell 2 = Firstname AA

WORD - sheet 2 - cell 1 = Name B
WORD - sheet 2 - cell 2 = Firstname BB
...

What I have :
WORD - sheet 1 - cell 1 = Name A
WORD - sheet 1 - cell 2 = Firstname AA

WORD - sheet 2 - cell 1 = Name A
WORD - sheet 2 - cell 2 = Firstname AA


I hope you better understand my problem now...

Any help would be really appreciate.

Thanks and Happy New Year to all of you.


Ced
Lausanne / Switzerland
 
Have you tried to play with MailMerge, DataSource and DataFields instead BookMarks ?

Hope This Help
PH.
 
Hi PH,

No, I didn't tried because I'm a beginner in VBA and I don't know Mailmerge, datasource and Datafields. I found the Bookmarks which worked just as I wanted and needed till now...!

If you have any suggestion... welcome

Thanks

Ced
Lausanne / Switzerland
 
The basic idea is to use the MailMerge tool of Word.
Depending of the logic embedded in your UserForm you may even don't have to use it. Feel free to play with the MailMerge wizard (Assistant publipostage) to see if it can achieve your goal.

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top