Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am juggling a couple of Microsoft application objects from within Excel VBA
Add-In. Basically, I am creating an draft email using an Outlook object and using Word object as editor (in Outlook) - all with Office 2003. All working fine on a couple of machines but on one machine (same build as others) the code is failing during a Find/Replace in the Word Range object. It is actually causing Excel to crash with a 'Send to Microsoft' memory stack error. The code is roughly :- Dim WdDoc as Word.Document Dim WdRg as Word.Range Dim objEmail As Object Dim objDrafts As Object Set objOutlook = New Outlook.Application Set objDrafts = objOutlook.Session.GetDefaultFolder(olFolderDrafts ) Set objEmail = objDrafts.Items.Add Set wdDoc = objEmail.GetInspector.WordEditor Set WdRg = WdDoc.Range(2,100) ' assume text fred somewhere in this range WdRg.Find.Text = "fred" WdRg.Replacement.Text = "bert" WdRg.Find.Execute Any thoughts why the code should fail (big time, taking out Excel) just on one machine but works OK on the other clone builds? A User option or Add-In conflict? Thanks, Andy. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel object linked to word will not add sums in word | Excel Discussion (Misc queries) | |||
Have problem in Manipulating Workbook Object and make macro shortest as possible | Excel Worksheet Functions | |||
Range Object CopyPicture Method; Paste to MS Word | Excel Programming | |||
Manipulating MS Word from Excel?? | Excel Programming | |||
Manipulating embeded exccel in word | Excel Programming |