VB6 application management application behaves differently during debugging than compilation

I have a vb6 application that uses Word interop to create multiple reports. There are several instructions in the introduction of these reports in 4 text fields around the image.

Recently, the top two text fields unexpectedly appeared on the next page, and I cannot understand why. When I go through the code and observe the construction of the word, everything is positioned correctly, however, if I compile the application, the error will appear again.

Any suggestions?

+3
source share
4 answers

Word. Microsoft Word Xxx Object Library, Dim

Dim oWord As Object '--- was Word.Application'
Dim oDoc As Object '--- was Word.Document'
...
oDoc.Protect wdAllowOnlyReading '--- keep using enums'
+1

- "" ? , , /.

, . . , , .

0

, , , VB ? , , , Word.

, .dot ?

It can be very useful if you show the code that is used to create the Word document, because then someone might notice something that might be reasonable to switch to a compiled version.

0
source

Do you have code in time-dependent events like Form_Activate, Load or Unload? I saw that all this happens differently when you iterate over the code and compile, especially on newer, faster machines.

0
source

Source: https://habr.com/ru/post/1772477/


All Articles