A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

macros for characters



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 10th 07, 06:02 PM posted to microsoft.public.outlook.program_vba
Peter K
external usenet poster
 
Posts: 13
Default macros for characters

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  
Old July 10th 07, 08:24 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default macros for characters

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  
Old July 10th 07, 08:50 PM posted to microsoft.public.outlook.program_vba
Peter K
external usenet poster
 
Posts: 13
Default macros for characters

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  
Old July 10th 07, 09:30 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default macros for characters

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  
Old July 11th 07, 01:12 AM posted to microsoft.public.outlook.program_vba
Peter K
external usenet poster
 
Posts: 13
Default macros for characters

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  
Old July 11th 07, 01:28 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default macros for characters

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 10:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.