Problem populating a word doc address

Desmondo

Board Regular
Joined
Feb 27, 2013
Messages
70
Hi i am completing a word doc based on a userform entry's. The problem is i am not sure how change a bookmark depending on entry. I will try to explain.

On occasions i write to company's or private landlords.

So the addresses are like so =

The Manager Mr His Name Mr His Name
Company Name Address Company
Address Address

I have bookedmarked landlord and if the name is ommitted it fills in The Manager by default which is fine and working. If there is no company it leaves a blank line in the letter address and i would like to know how i can remove this line. If anyone can help.

My code so far
Code:
Landlord = "The Manager"    If LSurname.Value <> "" Then
    Landlord = ComboBox13.Value & " " & LForename.Value & " " & LSurname.Value
    End If
    Call Module1.UpdateBookmark(wdDoc, "Landlord", Landlord)
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Sorry just seen this has got rather jumbled up

The Manager
Company Name
Address

Mr His Name
Address

Mr His Name
Company
Address
 
Upvote 0
So in a sense what i want to do if a company is not known then push bookmark for addressee down a line
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top