Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just upgraded to Office Professional 2003 from Office Professional XP.
The following code, when executed, completely and irrevocably crashes Microsoft Excel 2003 at the line <.Text = "^pDescription". It worked just find in Microsoft Excel XP. It even asks to send a report to Microsoft. Every time. Easily reproducible. I have updated to all service packs/patches, etc., too. Also, the line <Selection.Find.Replacement.ClearFormatting gives a "Automation error: the procedure number is out of range" error, which it didn't do before in Excel 2003. What the heck happened between the two versions? Now my code has completely blown up!!! Any ideas????? Any help would be greatly appreciated, as we have to get this program up and running for production! Thanks!!! Public Sub Test() Dim appWord As Word.Application Set appWord = New Word.Application appWord.Documents.Add appWord.Selection.Find.ClearFormatting appWord.Selection.Find.Replacement.ClearFormatting With appWord.Selection.Find .Text = "^pBREAK" .Replacement.Text = "-----" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With appwordSelection.Find.Execute Replace:=wdReplaceAll appWord.ActiveDocument.SaveAs "C:\TEST.DOC" appWord.ActiveDocument.Close appWord.Quit Set appWord = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy in Excel 2003 Paste in Word 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 Crashes | Excel Discussion (Misc queries) | |||
Copy and paste problem Excel 2003 to Word 2003 | Excel Discussion (Misc queries) | |||
Need help with mail merge - excel 2003 to word 2003 please.. | Excel Discussion (Misc queries) | |||
Excel Automation Find/Replace Excel 2000 and 2003 | Excel Programming |