Problem found in Word 2007

J

jCheah

I've a Word 2003 templates contains a sub procedure named
“Autosettings”. Please see the following code. I'm trying to load this
template under Word 2007 environment. FYI, this sub procedure contains
the code to set some the Word options to certain configuration. I
program this sub procedure to execute at startup every time user opens
a Word document. This sub executes very fast without any problem under
Word 2003, but it runs very slow under Word 2007. It's about more than
5 seconds longer. The speed might not noticeable if the user only open
one document, but it's disaster if the user opens more than 10
documents simultaneously.

Please try to copy the following sub to a sample .dot template and
make it run at Word 2003 and Word 2007 startup. Then you will see the
difference. Do you have any clue? Thanks in advanced.


Public Sub AutoSettings()

With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = False
.CorrectDays = True
.CorrectCapsLock = False
.ReplaceTextFromSpellingChecker = False
.CorrectKeyboardSetting = False
End With
With Options
.DefaultBorderLineWidth = 6
.AutoFormatAsYouTypeApplyHeadings = False
.AutoFormatAsYouTypeApplyBorders = False
.AutoFormatAsYouTypeApplyBulletedLists = False
.AutoFormatAsYouTypeApplyNumberedLists = False
.AutoFormatAsYouTypeApplyTables = False
.AutoFormatAsYouTypeReplaceQuotes = False
.AutoFormatAsYouTypeReplaceSymbols = False
.AutoFormatAsYouTypeReplaceOrdinals = False
.AutoFormatAsYouTypeReplaceFractions = False
.AutoFormatAsYouTypeReplacePlainTextEmphasis = False
.AutoFormatAsYouTypeReplaceHyperlinks = True
.AutoFormatAsYouTypeFormatListItemBeginning = False
.AutoFormatAsYouTypeDefineStyles = False
.IgnoreUppercase = False 'added by d.boegler 5/21/03
End With
With Options
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatReplaceQuotes = False
.AutoFormatReplaceSymbols = False
.AutoFormatReplaceOrdinals = False
.AutoFormatReplaceFractions = False
.AutoFormatReplacePlainTextEmphasis = False
.AutoFormatReplaceHyperlinks = True
.AutoFormatPreserveStyles = True
End With
Application.DisplayStatusBar = True
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayLeftScrollBar = False
.DisplayVerticalRuler = True
.DisplayRightRuler = False
.DisplayScreenTips = True
With .View
.ShowAnimation = True
.ShowPicturePlaceHolders = False
.ShowFieldCodes = False
.ShowBookmarks = False
.FieldShading = wdFieldShadingWhenSelected
.ShowDrawings = True
.ShowObjectAnchors = False
.ShowTextBoundaries = True
.ShowHighlight = True
End With
End With
With Options
.ReplaceSelection = True
.AllowDragAndDrop = True
.AutoWordSelection = True
.INSKeyForPaste = False
.SmartCutPaste = True
.AllowAccentedUppercase = False
.PictureEditor = "Microsoft Word"
.TabIndentKey = False
.Overtype = False
.AllowClickAndTypeMouse = False
.AutoKeyboardSwitching = False
End With

With Options
.UpdateFieldsAtPrint = False
.UpdateLinksAtPrint = False
.DefaultTray = "Use printer settings"
.PrintBackground = True
.PrintProperties = False
.PrintFieldCodes = False
.PrintComments = False
.PrintHiddenText = False
.PrintDrawingObjects = True
.PrintDraft = False
.PrintReverse = False
.MapPaperSize = True
End With
With ActiveDocument
.PrintPostScriptOverText = False
.PrintFormsData = False
End With
End Sub
 
T

Tony Jollans

This is known, although I have no idea whether a fix is in the wind.

--
Enjoy,
Tony

I've a Word 2003 templates contains a sub procedure named
“Autosettings”. Please see the following code. I'm trying to load this
template under Word 2007 environment. FYI, this sub procedure contains
the code to set some the Word options to certain configuration. I
program this sub procedure to execute at startup every time user opens
a Word document. This sub executes very fast without any problem under
Word 2003, but it runs very slow under Word 2007. It's about more than
5 seconds longer. The speed might not noticeable if the user only open
one document, but it's disaster if the user opens more than 10
documents simultaneously.

Please try to copy the following sub to a sample .dot template and
make it run at Word 2003 and Word 2007 startup. Then you will see the
difference. Do you have any clue? Thanks in advanced.


Public Sub AutoSettings()

With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = False
.CorrectDays = True
.CorrectCapsLock = False
.ReplaceTextFromSpellingChecker = False
.CorrectKeyboardSetting = False
End With
With Options
.DefaultBorderLineWidth = 6
.AutoFormatAsYouTypeApplyHeadings = False
.AutoFormatAsYouTypeApplyBorders = False
.AutoFormatAsYouTypeApplyBulletedLists = False
.AutoFormatAsYouTypeApplyNumberedLists = False
.AutoFormatAsYouTypeApplyTables = False
.AutoFormatAsYouTypeReplaceQuotes = False
.AutoFormatAsYouTypeReplaceSymbols = False
.AutoFormatAsYouTypeReplaceOrdinals = False
.AutoFormatAsYouTypeReplaceFractions = False
.AutoFormatAsYouTypeReplacePlainTextEmphasis = False
.AutoFormatAsYouTypeReplaceHyperlinks = True
.AutoFormatAsYouTypeFormatListItemBeginning = False
.AutoFormatAsYouTypeDefineStyles = False
.IgnoreUppercase = False 'added by d.boegler 5/21/03
End With
With Options
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatReplaceQuotes = False
.AutoFormatReplaceSymbols = False
.AutoFormatReplaceOrdinals = False
.AutoFormatReplaceFractions = False
.AutoFormatReplacePlainTextEmphasis = False
.AutoFormatReplaceHyperlinks = True
.AutoFormatPreserveStyles = True
End With
Application.DisplayStatusBar = True
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayLeftScrollBar = False
.DisplayVerticalRuler = True
.DisplayRightRuler = False
.DisplayScreenTips = True
With .View
.ShowAnimation = True
.ShowPicturePlaceHolders = False
.ShowFieldCodes = False
.ShowBookmarks = False
.FieldShading = wdFieldShadingWhenSelected
.ShowDrawings = True
.ShowObjectAnchors = False
.ShowTextBoundaries = True
.ShowHighlight = True
End With
End With
With Options
.ReplaceSelection = True
.AllowDragAndDrop = True
.AutoWordSelection = True
.INSKeyForPaste = False
.SmartCutPaste = True
.AllowAccentedUppercase = False
.PictureEditor = "Microsoft Word"
.TabIndentKey = False
.Overtype = False
.AllowClickAndTypeMouse = False
.AutoKeyboardSwitching = False
End With

With Options
.UpdateFieldsAtPrint = False
.UpdateLinksAtPrint = False
.DefaultTray = "Use printer settings"
.PrintBackground = True
.PrintProperties = False
.PrintFieldCodes = False
.PrintComments = False
.PrintHiddenText = False
.PrintDrawingObjects = True
.PrintDraft = False
.PrintReverse = False
.MapPaperSize = True
End With
With ActiveDocument
.PrintPostScriptOverText = False
.PrintFormsData = False
End With
End Sub
 

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

Top