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 - Word 2007 and Outlook 2007



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 9th 07, 02:11 PM posted to microsoft.public.outlook.program_vba
Hunter
external usenet poster
 
Posts: 7
Default Macros - Word 2007 and Outlook 2007


Here's my original msg below to another group: "Linda"


wrote in message news:


. com...


I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.


.... and here's a response - outlook 2007 doesn't use full-blown Word
2007 as its email editor - it just uses a sub-set of it...


---------- Forwarded message ----------
From: "Bob Buckland ?:-\)" 75214.226(At Beautiful Downtown)compuserve.com
Date: Nov 8, 8:54 pm
Subject: Word 2007 [Macros for Outlook 2007]
To: microsoft.public.office.setup


Hi Linda,

You may want to use the link below to also post in the MS Office Outlook VBA
group through the link below.

=============
"Linda" wrote in
oglegroups.com...
Question: I have not a clue how to create macros in Outlook 2007...
have created many many macros in Word 2003 that work fine w/the
upgraded Word 2007. Can someone point me in the right direction for
macro creation in Outlook 2007? Too bad MS Ofc 07 doesn't use all of
Word 2007 as it's mail editor... just worked great from a heavy user's
viewpoint. Thanks, Linda.
--
Please let us know if this has helped,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends


LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsof...ok.program_vba
or via browser:
http://microsoft.com/communities/new...icrosoft.publi...

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/communit...s/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com

Ads
  #2  
Old November 9th 07, 03:34 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Macros - Word 2007 and Outlook 2007

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.


  #3  
Old November 9th 07, 07:30 PM posted to microsoft.public.outlook.program_vba
Hunter
external usenet poster
 
Posts: 7
Default Macros - Word 2007 and Outlook 2007

Hi Sue,

Thanks... I read the tip and followed the example and just updated about 15
macros so they can be used in Outlook 2007 too. I can' claim to know what
this all means but it works! Only 1 other question which I've researched but
need your help... I need to include a hyperlink in one of my macros. I was
able to make the change in Word 2007 for the hyperlink but not sure how to
make this work for Outlook. Here's what I have so far... macro works great
but need www.intersouth.com/about/contact.aspx to show as a hyperlink.
Thanks, Linda.


Sub Directions()
'
' Directions Macro
'
'
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 "Please visit our website at
www.intersouth.com/about/contact.aspx for directions and parking information
to our office at the American Tobacco Campus."
Set objDoc = Nothing
Set objSel = Nothing
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.



  #4  
Old November 9th 07, 08:06 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Macros - Word 2007 and Outlook 2007

You need to use Word's Hyperlinks.Add method to insert the link. To get an example, I'd suggest that you record a macro in Word that uses the hyperlink dialog (Ctrl+K) rather than relying on the automatic formatting to kick in.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...
Hi Sue,

Thanks... I read the tip and followed the example and just updated about 15
macros so they can be used in Outlook 2007 too. I can' claim to know what
this all means but it works! Only 1 other question which I've researched but
need your help... I need to include a hyperlink in one of my macros. I was
able to make the change in Word 2007 for the hyperlink but not sure how to
make this work for Outlook. Here's what I have so far... macro works great
but need www.intersouth.com/about/contact.aspx to show as a hyperlink.
Thanks, Linda.


Sub Directions()
'
' Directions Macro
'
'
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 "Please visit our website at
www.intersouth.com/about/contact.aspx for directions and parking information
to our office at the American Tobacco Campus."
Set objDoc = Nothing
Set objSel = Nothing
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.



"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.



  #5  
Old November 9th 07, 09:11 PM posted to microsoft.public.outlook.program_vba
Hunter
external usenet poster
 
Posts: 7
Default Macros - Word 2007 and Outlook 2007

This is what I have in Word for this macro which works fine in Word but not
Outlook:
Can you just tell me what to type to make this work... too much time spent
already. Thanks very much, Linda.

Directions Macro
'
'
Selection.TypeText Text:="Please visit our website at "
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"http://www.intersouth.com/about/contact.aspx%20", SubAddress:="", _
ScreenTip:="", TextToDisplay:="www.intersouth.com/about/contact.aspx"
Selection.TypeText Text:= _
" for directions and parking information to our office at the"
Selection.TypeText Text:=" American Tobacco Campus."
Selection.TypeParagraph
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

You need to use Word's Hyperlinks.Add method to insert the link. To get an example, I'd suggest that you record a macro in Word that uses the hyperlink dialog (Ctrl+K) rather than relying on the automatic formatting to kick in.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...
Hi Sue,

Thanks... I read the tip and followed the example and just updated about 15
macros so they can be used in Outlook 2007 too. I can' claim to know what
this all means but it works! Only 1 other question which I've researched but
need your help... I need to include a hyperlink in one of my macros. I was
able to make the change in Word 2007 for the hyperlink but not sure how to
make this work for Outlook. Here's what I have so far... macro works great
but need www.intersouth.com/about/contact.aspx to show as a hyperlink.
Thanks, Linda.


Sub Directions()
'
' Directions Macro
'
'
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 "Please visit our website at
www.intersouth.com/about/contact.aspx for directions and parking information
to our office at the American Tobacco Campus."
Set objDoc = Nothing
Set objSel = Nothing
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.



"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.



  #6  
Old November 9th 07, 09:28 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Macros - Word 2007 and Outlook 2007

If you think about it, you'll know what to do next: Apply the same conversion process to this macro that you did to the others. The example you posted earlier shows you already know how to return Word.Document and Word.Selection objects from the open Outlook item.

Another approach is to build the boilerplate text as a QuickPart, which you can then insert with VBA code; see http://turtleflock-ol2007.spaces.liv...E3D8!158.entry and http://www.outlookcode.com/codedetail.aspx?id=1571
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...
This is what I have in Word for this macro which works fine in Word but not
Outlook:
Can you just tell me what to type to make this work... too much time spent
already. Thanks very much, Linda.

Directions Macro
'
'
Selection.TypeText Text:="Please visit our website at "
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"http://www.intersouth.com/about/contact.aspx%20", SubAddress:="", _
ScreenTip:="", TextToDisplay:="www.intersouth.com/about/contact.aspx"
Selection.TypeText Text:= _
" for directions and parking information to our office at the"
Selection.TypeText Text:=" American Tobacco Campus."
Selection.TypeParagraph
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

You need to use Word's Hyperlinks.Add method to insert the link. To get an example, I'd suggest that you record a macro in Word that uses the hyperlink dialog (Ctrl+K) rather than relying on the automatic formatting to kick in.

"hunter" wrote in message ...
Hi Sue,

Thanks... I read the tip and followed the example and just updated about 15
macros so they can be used in Outlook 2007 too. I can' claim to know what
this all means but it works! Only 1 other question which I've researched but
need your help... I need to include a hyperlink in one of my macros. I was
able to make the change in Word 2007 for the hyperlink but not sure how to
make this work for Outlook. Here's what I have so far... macro works great
but need www.intersouth.com/about/contact.aspx to show as a hyperlink.
Thanks, Linda.


Sub Directions()
'
' Directions Macro
'
'
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 "Please visit our website at
www.intersouth.com/about/contact.aspx for directions and parking information
to our office at the American Tobacco Campus."
Set objDoc = Nothing
Set objSel = Nothing
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.



"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.



  #7  
Old November 9th 07, 10:00 PM posted to microsoft.public.outlook.program_vba
Hunter
external usenet poster
 
Posts: 7
Default Macros - Word 2007 and Outlook 2007

Hi Sue,

Thanks for helping me today. I'm going to set this macro up w/the hyperlink
but in the meantime I went ahead and set this up in Quick Parts. I'm going
to get your book this weekend and read it. Thanks again, Linda.

"Sue Mosher [MVP-Outlook]" wrote:

If you think about it, you'll know what to do next: Apply the same conversion process to this macro that you did to the others. The example you posted earlier shows you already know how to return Word.Document and Word.Selection objects from the open Outlook item.

Another approach is to build the boilerplate text as a QuickPart, which you can then insert with VBA code; see http://turtleflock-ol2007.spaces.liv...E3D8!158.entry and http://www.outlookcode.com/codedetail.aspx?id=1571
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"hunter" wrote in message ...
This is what I have in Word for this macro which works fine in Word but not
Outlook:
Can you just tell me what to type to make this work... too much time spent
already. Thanks very much, Linda.

Directions Macro
'
'
Selection.TypeText Text:="Please visit our website at "
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"http://www.intersouth.com/about/contact.aspx%20", SubAddress:="", _
ScreenTip:="", TextToDisplay:="www.intersouth.com/about/contact.aspx"
Selection.TypeText Text:= _
" for directions and parking information to our office at the"
Selection.TypeText Text:=" American Tobacco Campus."
Selection.TypeParagraph
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

You need to use Word's Hyperlinks.Add method to insert the link. To get an example, I'd suggest that you record a macro in Word that uses the hyperlink dialog (Ctrl+K) rather than relying on the automatic formatting to kick in.

"hunter" wrote in message ...
Hi Sue,

Thanks... I read the tip and followed the example and just updated about 15
macros so they can be used in Outlook 2007 too. I can' claim to know what
this all means but it works! Only 1 other question which I've researched but
need your help... I need to include a hyperlink in one of my macros. I was
able to make the change in Word 2007 for the hyperlink but not sure how to
make this work for Outlook. Here's what I have so far... macro works great
but need www.intersouth.com/about/contact.aspx to show as a hyperlink.
Thanks, Linda.


Sub Directions()
'
' Directions Macro
'
'
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 "Please visit our website at
www.intersouth.com/about/contact.aspx for directions and parking information
to our office at the American Tobacco Campus."
Set objDoc = Nothing
Set objSel = Nothing
End Sub

"Sue Mosher [MVP-Outlook]" wrote:

Most Word macros that ran when Word was the email editor in earlier versions need just a few simple changes to be converted to run in the Outlook 2007 VBA context and refer to the currently open message. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for details.


"hunter" wrote in message ...

I upgraded to Office 2007. My macros work fine in Word but now they
do not work in Outlook... they did before. I have many macros defined
but no good if I can't use them in Outlook. For example... I have one
macro that is set up which types about 3 sentences instead of me
having to type this all the time... I just click CTL D. Any ideas...
Thanks, Linda.




 




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
Mail Merge using Outlook 2007 and Word 2007 Connie434 Outlook - General Queries 2 October 27th 07 12:27 AM
Macro works in Word 2007, but not in Outlook 2007 LesG Outlook and VBA 13 March 10th 07 11:30 PM
outlook 2007 with word 2007 installed not working Stephen Outlook - Installation 2 January 22nd 07 04:47 PM
How to best imitate using Word macros in Outlook 2007 AMolotkov Outlook - General Queries 3 December 25th 06 03:58 PM
How can I insert an address from Outlook 2007 into Word 2007? Ron Perry Outlook - Using Contacts 2 June 6th 06 03:24 AM


All times are GMT +1. The time now is 04:24 PM.


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