Acc MailMerge: Bullet style? duplicate bookmarks?

vinzz

Registered User.
Local time
Today, 02:02
Joined
Apr 24, 2008
Messages
47
hi,

I'm making a new Mailmerge with the bookmark function in VB access

first, I'd like to know how i can add a 'Bullet style' (like '-' or even better, a real black-bullet, in front of each line) in word trough VB. I'need this for a correct layout, if a text is bigger than one line it goes further on a new line, but without a 'space' at the beggining of the next line ( it's not aligned with first line!. (if i use "- " & me.somebox))
Example-FAULT:
- here you have some long text and after a while it will automaticly break this sentence into more than one line, but as you can see, the text is not aligned, and the second line starts under the '-'. (if you have big resolution this sentence could fit on one line here :P , but thats not the point)

The second line has to start under the first word of that sentence. when there is a break in the access data (chr(11)) it has too make a new bullet (same as first one). I don't know how too handle this.

The second problem i have with mailmerge are duplicate bookmarks in a doc.
for example: this is the text off bookmark 1: <bookm1> ..... again bookmark 1: <bookm1>

Where <bookm1> is one bookmark for two (or more) diffrent fields in the word-dot.
But it just fills one field, not the second :(
I tried to copy the bookmark (wordmenu > Insert > fields > bookmark > ref) but without any success. :(


my VBA access code: (GD_PV_Verant_Uitg = global string, )
Code:
...
If myword.activedocument.bookmarks("Verant_Uit_Gegevens").exists Then
myword.activedocument.bookmarks("Verant_Uit_Gegevens").Range.Text = GD_PV_Verant_Uitg
end if
...
My Two questions:
1. How can i input a bullet in word trough VB (Access)?
2. How can i use duplicate bookmarks correctly?
 
This code will create a footer, but maybe you can change it to create bullets.
.ActiveDocument.StoryRanges(wdPrimaryFooterStory).Bookmarks("Footer1").Select
.Selection.Text = (CStr(Forms!OGML!User))

As to duplicate bookmarks, sadly there is no such thing. You must add additional bookmarks using unbound text boxes. You could name them spot, spot1, spot2, etc., or use expression builder to gather or repeat fields.
 
i'll see what i can do with it.

Could it be possible that Footer1 in your code is already bookmarked in word?
if so: What does you're code do more than the one i already posted.
I use bookmarks in my header and footer already with my code, and it works perfectly.

for duplicating bookmarks i'm going to use a loop in vb that checks if a bookmark exits. Something like this:
Code:
bookmarks in word: mybookmark, mybookmark1, mybookmark2
'vb code:
dim Lcounter as long
LBookmark as string
LBookmark = "Bookmarkname"
Lcounter = 0
startover:
If myword.activedocument.bookmarks(LBookmark).exists Then
  myword.activedocument.bookmarks(LBookmark).Range.Text = Forms!aform.txtbxforbookmark
  LCounter = LCounter + 1
 LBookmark = LBookmark & GCounter
goto startover
else: LCounter = 0
end if
...
 
I was thinking Bullets might be one of the Range Objects. I did notice that if you type the asterisk "*" along with a space [in Word] you will get a bullet. You could preceed your text with the asterisk. Good luck.
 

Users who are viewing this thread

Back
Top Bottom