-
Thanks Jacob,
I had just figured it out & was about to post this. as this works. I guess I finally figured out some of these goofy objects.
I take it two statements would move the cursor down 1 line and then move it to the end of that line. Which is not bad. What I did was count the 31 characters for { DOCVARIABLE /* MERGEFORMAT } and add the length of the variable string, then append a space and move past that.
Thanks I think this part of the project is just about wrapped.
I really like this site. There are some smart people who hang around.
[vba]
Private Sub AddIt()
Dim Ct As Integer
If ListBox1.Text = "" Then Exit Sub
Selection.Fields.Add Range:=Selection.Range, _
Type:=wdFieldDocVariable, _
Text:=FetchCodeAz(ListBox1.Text)
Ct = 31 + Len(FetchCodeAz(ListBox1.Text))
Selection.MoveRight unit:=wdCharacter, Count:=Ct
Selection.InsertAfter " "
Selection.MoveRight unit:=wdCharacter, Count:=1
AppendLabel ListBox1.List(ListBox1.ListIndex)
End Sub
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules