OLE becomes very slow with sp2

L

Link

/************
can someone remove my post on the beginner's forum - it looks her
should be the right place for it :)
*************/

Hi there,
I have to create a Word decument from VBA. everything works fine wit
sp1 (quite fast). but once I upgrade to sp2, it becomes very slow (
times slower). it used about 1 minute to create the doc file now it i
taking about 6 minutes.

some typical statements for each data column (I have hundreds o
columns to create) I used are

lole_OLE.Application.ActiveDocument.Shapes.AddTextbox(1
of_convert_word_cmtopts(1.89), of_convert_word_cmtopts(7.89)
of_convert_word_cmtopts(8.1), of_convert_word_cmtopts(2.8)).Select
lole_OLE_Selection.ShapeRange.TextFrame.TextRange.Select
ls_dw_string_value = String(dw_summary.Object.compute_4[1])
lole_OLE_Selection.TypeText("My doc")
lole_OLE_Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 255, 255)
lole_OLE_Selection.WholeStory
lole_OLE_Selection.Font.Name = "Arial"
lole_OLE_Selection.Font.Size = 10
lole_OLE_Selection.ShapeRange.TextFrame.MarginLeft = 0
lole_OLE_Selection.ShapeRange.TextFrame.MarginRight = 0
lole_OLE_Selection.ShapeRange.TextFrame.MarginTop = 0
lole_OLE_Selection.ShapeRange.TextFrame.MarginBottom = 0

the AddTextBox command is the slowest I can see.

can someone give me some suggestions? I'm going to try to save th
format to a template first. but this will just solve part of th
problem (I've tested it - the doc file can be generated in 3 minutes)
I need to get it back to 1-2 minutes.
I've also tried to turn off all the sp functions on the "securit
centre" panel but it didnot show better performance.

is there a way without programming to get the performance back (a
sp1)???

Li
 
L

Link

ontherthan the OLE function call, the PCs with SP2 are running ok (
little bit slower than SP1 PCs but still pretty fast. )
can some one help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top