D
djconner
I have a VB6 application that generates a "transcript" as a Microsoft
Word document. It has been running under Windows 2000/Word 2000, but
now I'm trying to get it to work under Windows XP/Word 2003.
Most everything seems to be OK, but the problem is this bit at the end
of the document, where I have to insert a JPG of a signature between
some boilerplate text. Basically, it looks like:
------
THE ABOVE DATA IS TRUE AND CORRECT.
(signature JPG)
ALPHONSE CAPONE, ASSISTANT MANAGER, CUSTOMER RELATIONS
------
Worked fine for ages with Word 2000, but in Word 2003, it gets messed
up, and the JPG ends up "on top of" the second line of text.
Here's the code I'm using (hope it's readable):
-----
Set oRange =
WordDoc.Range(Start:=WordDoc.Characters(WordDoc.Characters.Count -
1).End, End:=WordDoc.Characters(WordDoc.Characters.Count - 1).End)
oRange.InsertBefore UCase$("This information is determined to be true
and correct.") & vbCrLf & vbCrLf
Set oRange =
WordDoc.Range(Start:=WordDoc.Characters(WordDoc.Characters.Count -
1).End, End:=WordDoc.Characters(WordDoc.Characters.Count - 1).End)
WordDoc.Shapes.AddPicture FileName:=App.Path & "\Capone-Signature.jpg",
LinkToFile:=False, SaveWithDocument:=True, Anchor:=oRange
oRange.InsertAfter "ALPHONSE CAPONE, ASSISTANT MANAGER, CUSTOMER
RELATIONS" & LPad("CERTIFICATION DATE: " & Format$(Now, "MM/DD/YYYY"),
37)
-----
(One thing I just belatedly learned while googling for help on this is
that Word doesn't recognize vbCrLf! Never knew that, but it doesn't
appear to have any bearing on this particular problem.)
What do I need to do to get the JPG to be in the right place, as it is
in Word 2000? Any help would be appreciated!
Word document. It has been running under Windows 2000/Word 2000, but
now I'm trying to get it to work under Windows XP/Word 2003.
Most everything seems to be OK, but the problem is this bit at the end
of the document, where I have to insert a JPG of a signature between
some boilerplate text. Basically, it looks like:
------
THE ABOVE DATA IS TRUE AND CORRECT.
(signature JPG)
ALPHONSE CAPONE, ASSISTANT MANAGER, CUSTOMER RELATIONS
------
Worked fine for ages with Word 2000, but in Word 2003, it gets messed
up, and the JPG ends up "on top of" the second line of text.
Here's the code I'm using (hope it's readable):
-----
Set oRange =
WordDoc.Range(Start:=WordDoc.Characters(WordDoc.Characters.Count -
1).End, End:=WordDoc.Characters(WordDoc.Characters.Count - 1).End)
oRange.InsertBefore UCase$("This information is determined to be true
and correct.") & vbCrLf & vbCrLf
Set oRange =
WordDoc.Range(Start:=WordDoc.Characters(WordDoc.Characters.Count -
1).End, End:=WordDoc.Characters(WordDoc.Characters.Count - 1).End)
WordDoc.Shapes.AddPicture FileName:=App.Path & "\Capone-Signature.jpg",
LinkToFile:=False, SaveWithDocument:=True, Anchor:=oRange
oRange.InsertAfter "ALPHONSE CAPONE, ASSISTANT MANAGER, CUSTOMER
RELATIONS" & LPad("CERTIFICATION DATE: " & Format$(Now, "MM/DD/YYYY"),
37)
-----
(One thing I just belatedly learned while googling for help on this is
that Word doesn't recognize vbCrLf! Never knew that, but it doesn't
appear to have any bearing on this particular problem.)
What do I need to do to get the JPG to be in the right place, as it is
in Word 2000? Any help would be appreciated!