Hi
I'm working on a word document. I want to choose my receiver of the letter via a userform in excel (.xlsm-file) "Template[VBA]". The reciever could be chosen by a combobox "CB_Rec", there are 8 different selectable recievers: "Rec1", "Rec2", ....
In the worksheet "Data_VBA" are the addresses of the recievers.
Sheet: "Data_VBA"
Column A: recievers
Column B: First name
Column C: Last name
Column D: adress line
Column E: postal code
Column F: city
Row 1 is the header of the columns
Capture.PNG
These cells (B2:F9) will automatically be filled by a database
I've created a userform "UserForm1" with a combobox "CB_Rec" to choose the receiver. Then I want to press a commandbutton "CommandButton2" to generate an envelope (Word document "envelope[VBA]") with the address of the selected receiver.
Now, I have to match the fields manually for mailings.
Adress 1 : Street + No
City: Postal code
Postal code: City
(city and postal code must me changed because of the Belgian letter layout)
enveloppe.PNG
After the envelope got generated, It has to be printed. Preferably also after I clicked "CommandButton2"
And a messagebox will say "Uw enveloppe wordt gegenereerd" (your enveloppe will be generated)
So, when I pushed the button, I'll get a printed envelope with the address of the selected reciever.
Can someone help me?
If you need more information, just ask.
Bookmarks