An existing VB6 app uses Word automation to create/print reports. The posted code is a small snippet of the whole process but the majority of the code uses the these same Word methods/properties.
The first 3 lines of the attached picture are what normally gets created/printed. The bottom 3 lines are what is happening to 1 user but not all the time. The TypeText method is printing all the text in the same position. Sometimes closing/opening the app solves the problem but in some cases a re-boot is necessary.
I don't know much about Word and need some suggestions on how to begin to troubleshoot this problem.
Thanks.
Code:With wdApp .Selection.ParagraphFormat.TabStops.Add Position:=.InchesToPoints(4.25), Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces .Selection.ParagraphFormat.TabStops.Add Position:=.InchesToPoints(5), Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces .Selection.TypeText Text:="B.C. CORONERS SERVICE" & vbTab & "TOXICOLOGY REPORT" .Selection.TypeParagraph .Selection.TypeParagraph .Selection.ParagraphFormat.TabStops.Add Position:=.InchesToPoints(1.5), Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces .Selection.TypeText Text:="PTC No:" & vbTab .Selection.Font.Bold = wdToggle .Selection.TypeText Text:= Format(rs!Case_PTC_No, "####-####") .Selection.Font.Bold = wdToggle .Selection.TypeParagraph .Selection.TypeParagraph .Selection.TypeText Text:="The results are as follows: (* indicates new result)" .Selection.TypeParagraph .Selection.TypeParagraph




Reply With Quote