Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

OLE becomes very slow with sp2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Link - 03 Oct 2005 15:03 GMT
/************
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
Link - 04 Oct 2005 14:23 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.