![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Before Outlook 2007 all my Word macros for characters worked fine also in
Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
Ads |
#2
|
|||
|
|||
![]()
That's because you're trying to run a Word macro within the Outlook VBA environment. The solution would be to instantiate a Word.Selection object representing the selection in the open email message, something like this:
Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objDoc = Application.ActiveInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.TypeText "€" -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter K" wrote in message ... Before Outlook 2007 all my Word macros for characters worked fine also in Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
#3
|
|||
|
|||
![]()
Thxs a lot; I wish though they would not have removed Word as Outlook word
processor. Peter K "Sue Mosher [MVP-Outlook]" wrote: That's because you're trying to run a Word macro within the Outlook VBA environment. The solution would be to instantiate a Word.Selection object representing the selection in the open email message, something like this: Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objDoc = Application.ActiveInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.TypeText "€" -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter K" wrote in message ... Before Outlook 2007 all my Word macros for characters worked fine also in Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
#4
|
|||
|
|||
![]()
They didn't remove it. They did just the opposite. Word is now the only editor for Outlook, and it's available for all items except sticky notes. That means that item bodies are fully programmable in ways they never were before -- very good news for developers.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter K" wrote in message ... Thxs a lot; I wish though they would not have removed Word as Outlook word processor. Peter K "Sue Mosher [MVP-Outlook]" wrote: That's because you're trying to run a Word macro within the Outlook VBA environment. The solution would be to instantiate a Word.Selection object representing the selection in the open email message, something like this: Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objDoc = Application.ActiveInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.TypeText "€" "Peter K" wrote in message ... Before Outlook 2007 all my Word macros for characters worked fine also in Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
#5
|
|||
|
|||
![]()
I appreciate what you're saying. From ny view, though, previously my Word
macros worked in Outlook. Now they don't. That part has gotten much more complicated. PS: ordered your new book. Peter K "Sue Mosher [MVP-Outlook]" wrote: They didn't remove it. They did just the opposite. Word is now the only editor for Outlook, and it's available for all items except sticky notes. That means that item bodies are fully programmable in ways they never were before -- very good news for developers. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter K" wrote in message ... Thxs a lot; I wish though they would not have removed Word as Outlook word processor. Peter K "Sue Mosher [MVP-Outlook]" wrote: That's because you're trying to run a Word macro within the Outlook VBA environment. The solution would be to instantiate a Word.Selection object representing the selection in the open email message, something like this: Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objDoc = Application.ActiveInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.TypeText "€" "Peter K" wrote in message ... Before Outlook 2007 all my Word macros for characters worked fine also in Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
#6
|
|||
|
|||
![]()
I wouldn't call adding a couple of Set statements "much more complicated," certainly not in comparison with the operations in Outlook that really, really are complex.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter K" wrote in message news ![]() I appreciate what you're saying. From ny view, though, previously my Word macros worked in Outlook. Now they don't. That part has gotten much more complicated. PS: ordered your new book. Peter K "Sue Mosher [MVP-Outlook]" wrote: They didn't remove it. They did just the opposite. Word is now the only editor for Outlook, and it's available for all items except sticky notes. That means that item bodies are fully programmable in ways they never were before -- very good news for developers. "Peter K" wrote in message ... Thxs a lot; I wish though they would not have removed Word as Outlook word processor. Peter K "Sue Mosher [MVP-Outlook]" wrote: That's because you're trying to run a Word macro within the Outlook VBA environment. The solution would be to instantiate a Word.Selection object representing the selection in the open email message, something like this: Dim objDoc As Word.Document Dim objSel As Word.Selection On Error Resume Next Set objDoc = Application.ActiveInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.TypeText "€" "Peter K" wrote in message ... Before Outlook 2007 all my Word macros for characters worked fine also in Outlook, as I used Word as Outlook editor. Withthat no longer possible, I have successfully transferred my macros into normalemail.dotm, however they do not execute as intended. All have the typical structu Sub Euro() ' Euro Macro Selection.TypeText Text:="€" End Sub While they execute fine in Word, in Outlook I get an error: Run-Time Error ‘424’: Object Required Any help/suggestions would be appreciated. Peter K |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OE6 + IE7: characters typed | pedro | Outlook Express | 3 | February 27th 07 01:28 PM |
reply characters | Alynn Baker | Outlook Express | 2 | August 6th 06 06:14 PM |
chinese characters | David Verbeek | Outlook - General Queries | 0 | July 22nd 06 01:24 AM |
Chinese Characters | txz | Outlook - Using Contacts | 0 | July 16th 06 04:34 AM |
language characters | tomber77 | Outlook - Installation | 0 | January 9th 06 03:34 PM |