P
Peter Newman
Im creating a word doc on the fly from a VB6 application.
Ive managed to create a blank word Doc and insert a Header and footer without a problem. Ive also managed to insert a lines of text. The problem is that a single line has two aprts to it, a Discripter ( on ht eleft) and a monetry value to appear on the right of the page. How can i do this and right align the Monarty value
the code im using is
Dim oWord as Word Applicatio
Dim oDoc as word.Documen
Dim oparagraph as word.paragrap
Dim oRng as Word.Rang
Set oWord = CreateObject("word.Application"
Set oDoc = oWord.Document.Ad
With oDo
Set oParagraph = oDoc.Content.Paragraphs.Ad
Set oRng = Odoc.Bookmarks("\EndOfDoc").Rang
oRng.insertAfter "Line 1" & vbtab & "10.00" & vbcrl
oRng.insertAfter "Line 2" & vbtab & "1.00
orng.Collapse wdCollapseEn
End Wit
Set oDoc = Nothin
oword.Qui
I end up with the followin
Line 1 10.0
Line 2 1.0
But wan
Line 1 10.0
Line 2 1.0
Any suggestions
Ive managed to create a blank word Doc and insert a Header and footer without a problem. Ive also managed to insert a lines of text. The problem is that a single line has two aprts to it, a Discripter ( on ht eleft) and a monetry value to appear on the right of the page. How can i do this and right align the Monarty value
the code im using is
Dim oWord as Word Applicatio
Dim oDoc as word.Documen
Dim oparagraph as word.paragrap
Dim oRng as Word.Rang
Set oWord = CreateObject("word.Application"
Set oDoc = oWord.Document.Ad
With oDo
Set oParagraph = oDoc.Content.Paragraphs.Ad
Set oRng = Odoc.Bookmarks("\EndOfDoc").Rang
oRng.insertAfter "Line 1" & vbtab & "10.00" & vbcrl
oRng.insertAfter "Line 2" & vbtab & "1.00
orng.Collapse wdCollapseEn
End Wit
Set oDoc = Nothin
oword.Qui
I end up with the followin
Line 1 10.0
Line 2 1.0
But wan
Line 1 10.0
Line 2 1.0
Any suggestions