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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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