A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to get to email from Word



 
 
Thread Tools Display Modes
  #11  
Old April 19th, 2008, 11:00 AM posted to microsoft.public.word.newusers
Jen[_10_]
external usenet poster
 
Posts: 24
Default How to get to email from Word

Yes it just occurred to me THANKS.
"Graham Mayor" wrote in message
...
From the vba editor tools references check the Microsoft Outlook 12
Object Library

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Jen wrote:
Hi Graham

In Word 2007 I select text and run macro but I get a compile error on
below line:

Dim oOutlookApp As Outlook.Application

User define type not defined. How can I resolve this please?



"Graham Mayor" wrote in message
...
I suspect what you are looking for is the 'Send To Mail Recipient'
command which you can add to the QAT.
or
You can select the text you want in your e-mail and run the following
macro

Sub Send_Extract_As_Mail()
' send the document in an Outlook Email message
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")

'Outlook wasn't running, start it from code
If Err 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.to = "
.Subject = InputBox("Subject?")
.Body = Selection
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub

http://www.gmayor.com/installing_macro.htm

If you want to pick the recipient delete the .to line


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



George Lutz wrote:
Because in my Word document, I use macros that greatly simplify my
composing of the email. E.g., if I want to send an email to
Jennifer, my ETJ macro prepares the header, including To: Jennifer,
From: George, it inputs the client name into a line, etc. Then
I sue another macro to select and copy the whole email, hit the
button that apparently no longer exists in 2007, then hit Control-V
to insert everything into the blank email template.

"Gordon" wrote:

"George Lutz" wrote in
message ...
But I don't want to send the entire Word document -- just the
portion of it
that is my email. I take notes as I go through the day, and
occasionally compose an email that I then want to send. The email
is just a small portion
of the day's notes. So, I compose the email, then cut and paste
its text into Outlook. The button I used in Word 2003 called up
Outlook, opened a blank email, and allowed me to paste in the text
I had prepared in Word. I
also had a button that called up Outlook with an email already
addressed to
my assistant, who is the recipient of about half of the 20 or so
emails I send each day -- very convenient. Amazing that such a
useful feature would
be eliminated in an "updated" version of Word!



Unfortunately Outlook 2007 doesn't use all of Word 2007 as the
email editor - it uses a stub. Therefore you can't do what you
used to do in 2003 in the same way.
However, I don't understand why you would compose an email in Word
and then paste the text into an email - why not just write the text
directly into a new email message?





  #12  
Old April 19th, 2008, 12:13 PM posted to microsoft.public.word.newusers
Terry Farrell
external usenet poster
 
Posts: 3,004
Default How to get to email from Word

George

You can add the Outlook command button to the QAT, just like you can add the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the portion of
it
that is my email. I take notes as I go through the day, and occasionally
compose an email that I then want to send. The email is just a small
portion
of the day's notes. So, I compose the email, then cut and paste its text
into Outlook. The button I used in Word 2003 called up Outlook, opened a
blank email, and allowed me to paste in the text I had prepared in Word.
I
also had a button that called up Outlook with an email already addressed
to
my assistant, who is the recipient of about half of the 20 or so emails I
send each day -- very convenient. Amazing that such a useful feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar to
the
top of the windows which looks and feels identical to the blank email in
Outlook.

In Word 2007, you need to add this command button Send Mail to Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had an icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl compose
and
email in word, then select and copy it, then click on this icno, and an
email
opened up ready for me to paste in the text. I am pretty sure I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access Toolbar?

Thanks.

George Lutz



  #13  
Old April 19th, 2008, 02:13 PM posted to microsoft.public.word.newusers
George Lutz[_2_]
external usenet poster
 
Posts: 7
Default How to get to email from Word

Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not seem to be
a Command available to me in Word Options | Customize | All Commands. Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you can add the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the portion of
it
that is my email. I take notes as I go through the day, and occasionally
compose an email that I then want to send. The email is just a small
portion
of the day's notes. So, I compose the email, then cut and paste its text
into Outlook. The button I used in Word 2003 called up Outlook, opened a
blank email, and allowed me to paste in the text I had prepared in Word.
I
also had a button that called up Outlook with an email already addressed
to
my assistant, who is the recipient of about half of the 20 or so emails I
send each day -- very convenient. Amazing that such a useful feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar to
the
top of the windows which looks and feels identical to the blank email in
Outlook.

In Word 2007, you need to add this command button Send Mail to Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had an icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl compose
and
email in word, then select and copy it, then click on this icno, and an
email
opened up ready for me to paste in the text. I am pretty sure I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access Toolbar?

Thanks.

George Lutz


  #14  
Old April 19th, 2008, 05:13 PM posted to microsoft.public.word.newusers
Terry Farrell
external usenet poster
 
Posts: 3,004
Default How to get to email from Word

Right-click anywhere on the QAT and select Customize. In the customize
dialog, select All Commands and scroll down to Microsoft Outlook.

But I am assuming that you have the whole Office 2007 suit and not just Word
2007 mixed with Outlook 2003. That combination won't work as Word 2007 needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in message
...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not seem to
be
a Command available to me in Word Options | Customize | All Commands.
Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you can add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a small
portion
of the day's notes. So, I compose the email, then cut and paste its
text
into Outlook. The button I used in Word 2003 called up Outlook, opened
a
blank email, and allowed me to paste in the text I had prepared in
Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so emails
I
send each day -- very convenient. Amazing that such a useful feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar to
the
top of the windows which looks and feels identical to the blank email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this icno, and
an
email
opened up ready for me to paste in the text. I am pretty sure I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz



  #15  
Old April 19th, 2008, 05:51 PM posted to microsoft.public.word.newusers
George Lutz[_2_]
external usenet poster
 
Posts: 7
Default How to get to email from Word

Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted into the
email body preserves the formatting it had in Word? When I run your macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the customize
dialog, select All Commands and scroll down to Microsoft Outlook.

But I am assuming that you have the whole Office 2007 suit and not just Word
2007 mixed with Outlook 2003. That combination won't work as Word 2007 needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in message
...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not seem to
be
a Command available to me in Word Options | Customize | All Commands.
Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you can add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a small
portion
of the day's notes. So, I compose the email, then cut and paste its
text
into Outlook. The button I used in Word 2003 called up Outlook, opened
a
blank email, and allowed me to paste in the text I had prepared in
Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so emails
I
send each day -- very convenient. Amazing that such a useful feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar to
the
top of the windows which looks and feels identical to the blank email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this icno, and
an
email
opened up ready for me to paste in the text. I am pretty sure I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz



  #16  
Old April 19th, 2008, 07:19 PM posted to microsoft.public.word.newusers
Terry Farrell
external usenet poster
 
Posts: 3,004
Default How to get to email from Word

In Outlook, go to Tools, Options, select the Mail Format tab and then click
on Editor Options at the bottom.

Select the Advanced tab and then under Cut, Copy Paste section, make sure
that the Keep Source formatting option is selected. that should then paste
and keep your formatting without need to modify the macro.

Terry

"George Lutz" wrote in message
...
Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted into the
email body preserves the formatting it had in Word? When I run your
macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the customize
dialog, select All Commands and scroll down to Microsoft Outlook.

But I am assuming that you have the whole Office 2007 suit and not just
Word
2007 mixed with Outlook 2003. That combination won't work as Word 2007
needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in message
...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not seem
to
be
a Command available to me in Word Options | Customize | All Commands.
Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you can
add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the
portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a
small
portion
of the day's notes. So, I compose the email, then cut and paste its
text
into Outlook. The button I used in Word 2003 called up Outlook,
opened
a
blank email, and allowed me to paste in the text I had prepared in
Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so
emails
I
send each day -- very convenient. Amazing that such a useful
feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar
to
the
top of the windows which looks and feels identical to the blank
email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in
message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had
an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this icno,
and
an
email
opened up ready for me to paste in the text. I am pretty sure I
used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz




  #17  
Old April 20th, 2008, 03:37 AM posted to microsoft.public.word.newusers
George Lutz[_2_]
external usenet poster
 
Posts: 7
Default How to get to email from Word

Terry:

Thanks, but that had no effect on the result.

George Lutz

"Terry Farrell" wrote:

In Outlook, go to Tools, Options, select the Mail Format tab and then click
on Editor Options at the bottom.

Select the Advanced tab and then under Cut, Copy Paste section, make sure
that the Keep Source formatting option is selected. that should then paste
and keep your formatting without need to modify the macro.

Terry

"George Lutz" wrote in message
...
Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted into the
email body preserves the formatting it had in Word? When I run your
macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the customize
dialog, select All Commands and scroll down to Microsoft Outlook.

But I am assuming that you have the whole Office 2007 suit and not just
Word
2007 mixed with Outlook 2003. That combination won't work as Word 2007
needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in message
...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not seem
to
be
a Command available to me in Word Options | Customize | All Commands.
Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you can
add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in message
...
But I don't want to send the entire Word document -- just the
portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a
small
portion
of the day's notes. So, I compose the email, then cut and paste its
text
into Outlook. The button I used in Word 2003 called up Outlook,
opened
a
blank email, and allowed me to paste in the text I had prepared in
Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so
emails
I
send each day -- very convenient. Amazing that such a useful
feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to Mail
Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email address bar
to
the
top of the windows which looks and feels identical to the blank
email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in
message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I had
an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this icno,
and
an
email
opened up ready for me to paste in the text. I am pretty sure I
used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz





  #18  
Old April 20th, 2008, 07:58 AM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.word.newusers,microsoft.public.word.vba.general
Graham Mayor
external usenet poster
 
Posts: 18,297
Default How to get to email from Word

I can't think of a way to pass the formatting between the applications
using this macro construction. Until someone comes up with something better,
change the line.

..Body = Selection
to
..Body = ""

and paste your formatted selection into the text area.

To cast the net wider I have cross-posted to the programming and Outlook
forums

Sub Send_Extract_As_Mail()
' send the document in an Outlook Email message
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")

'Outlook wasn't running, start it from code
If Err 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.to = "
.Subject = InputBox("Subject?")
.Body = Selection
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




George Lutz wrote:
Terry:

Thanks, but that had no effect on the result.

George Lutz

"Terry Farrell" wrote:

In Outlook, go to Tools, Options, select the Mail Format tab and
then click on Editor Options at the bottom.

Select the Advanced tab and then under Cut, Copy Paste section, make
sure that the Keep Source formatting option is selected. that should
then paste and keep your formatting without need to modify the macro.

Terry

"George Lutz" wrote in message
...
Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted
into the email body preserves the formatting it had in Word? When
I run your macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the
customize dialog, select All Commands and scroll down to Microsoft
Outlook.

But I am assuming that you have the whole Office 2007 suit and not
just Word
2007 mixed with Outlook 2003. That combination won't work as Word
2007 needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in
message ...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not
seem to
be
a Command available to me in Word Options | Customize | All
Commands. Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you
can add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in
message
...
But I don't want to send the entire Word document -- just the
portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a
small
portion
of the day's notes. So, I compose the email, then cut and
paste its text
into Outlook. The button I used in Word 2003 called up Outlook,
opened
a
blank email, and allowed me to paste in the text I had prepared
in Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so
emails
I
send each day -- very convenient. Amazing that such a useful
feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to
Mail Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email
address bar to
the
top of the windows which looks and feels identical to the blank
email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send
Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in
message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I
had an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this
icno, and
an
email
opened up ready for me to paste in the text. I am pretty sure
I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz



  #19  
Old April 20th, 2008, 08:59 AM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.word.newusers,microsoft.public.word.vba.general
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default How to get to email from Word

Try

..Body = Selection.FormattedText

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Graham Mayor" wrote in message
...
I can't think of a way to pass the formatting between the applications
using this macro construction. Until someone comes up with something
better, change the line.

.Body = Selection
to
.Body = ""

and paste your formatted selection into the text area.

To cast the net wider I have cross-posted to the programming and Outlook
forums

Sub Send_Extract_As_Mail()
' send the document in an Outlook Email message
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")

'Outlook wasn't running, start it from code
If Err 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.to = "
.Subject = InputBox("Subject?")
.Body = Selection
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




George Lutz wrote:
Terry:

Thanks, but that had no effect on the result.

George Lutz

"Terry Farrell" wrote:

In Outlook, go to Tools, Options, select the Mail Format tab and
then click on Editor Options at the bottom.

Select the Advanced tab and then under Cut, Copy Paste section, make
sure that the Keep Source formatting option is selected. that should
then paste and keep your formatting without need to modify the macro.

Terry

"George Lutz" wrote in message
...
Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted
into the email body preserves the formatting it had in Word? When
I run your macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the
customize dialog, select All Commands and scroll down to Microsoft
Outlook.

But I am assuming that you have the whole Office 2007 suit and not
just Word
2007 mixed with Outlook 2003. That combination won't work as Word
2007 needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in
message ...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does not
seem to
be
a Command available to me in Word Options | Customize | All
Commands. Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like you
can add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in
message
...
But I don't want to send the entire Word document -- just the
portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just a
small
portion
of the day's notes. So, I compose the email, then cut and
paste its text
into Outlook. The button I used in Word 2003 called up Outlook,
opened
a
blank email, and allowed me to paste in the text I had prepared
in Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or so
emails
I
send each day -- very convenient. Amazing that such a useful
feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email in
Outlook.
All
you ever needed to do from Word was to click on the Send to
Mail Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email
address bar to
the
top of the windows which looks and feels identical to the blank
email
in
Outlook.

In Word 2007, you need to add this command button Send Mail to
Recipient
to
the QAT because Microsoft inexplicably left it off the Send
Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote in
message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I
had an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I wouudl
compose
and
email in word, then select and copy it, then click on this
icno, and
an
email
opened up ready for me to paste in the text. I am pretty sure
I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick Access
Toolbar?

Thanks.

George Lutz





  #20  
Old April 20th, 2008, 09:19 AM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.word.newusers,microsoft.public.word.vba.general
Graham Mayor
external usenet poster
 
Posts: 18,297
Default How to get to email from Word

I had already tried that

The formatting is lost between Word and Outlook and there doesn't seem to be
a way to actually paste into the text area of the Outlook message window
using the macro that I have found ... yet

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org

..

Doug Robbins - Word MVP wrote:
Try

.Body = Selection.FormattedText


"Graham Mayor" wrote in message
...
I can't think of a way to pass the formatting between the
applications using this macro construction. Until someone comes up
with something better, change the line.

.Body = Selection
to
.Body = ""

and paste your formatted selection into the text area.

To cast the net wider I have cross-posted to the programming and
Outlook forums

Sub Send_Extract_As_Mail()
' send the document in an Outlook Email message
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")

'Outlook wasn't running, start it from code
If Err 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.to = "
.Subject = InputBox("Subject?")
.Body = Selection
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




George Lutz wrote:
Terry:

Thanks, but that had no effect on the result.

George Lutz

"Terry Farrell" wrote:

In Outlook, go to Tools, Options, select the Mail Format tab and
then click on Editor Options at the bottom.

Select the Advanced tab and then under Cut, Copy Paste section,
make sure that the Keep Source formatting option is selected. that
should then paste and keep your formatting without need to modify
the macro. Terry

"George Lutz" wrote in
message ...
Terry -- thanks, I found it.

Graham: Can your macro be modifed so that the text that is pasted
into the email body preserves the formatting it had in Word? When
I run your macro,
bolded text becomes unbolded and tabs disappear.

Thanks.

George Lutz

"Terry Farrell" wrote:

Right-click anywhere on the QAT and select Customize. In the
customize dialog, select All Commands and scroll down to
Microsoft Outlook.

But I am assuming that you have the whole Office 2007 suit and
not just Word
2007 mixed with Outlook 2003. That combination won't work as Word
2007 needs
Outlook 2007 for compatibility.

Hope this sorts it for you.

Terry

"George Lutz" wrote in
message
...
Graham's macro works very nicely -- thank you, Graham.

Terry: I would like to try your suggestion, but Outlook does
not seem to
be
a Command available to me in Word Options | Customize | All
Commands. Where
can I find the Command to which you are referring?

Thanks.

George Lutz

"Terry Farrell" wrote:

George

You can add the Outlook command button to the QAT, just like
you can add
the
Send to Mail Recipient tool to the QAT.

Terry Farrell

"George Lutz" wrote in
message
...
But I don't want to send the entire Word document -- just the
portion
of
it
that is my email. I take notes as I go through the day, and
occasionally
compose an email that I then want to send. The email is just
a small
portion
of the day's notes. So, I compose the email, then cut and
paste its text
into Outlook. The button I used in Word 2003 called up
Outlook, opened
a
blank email, and allowed me to paste in the text I had
prepared in Word.
I
also had a button that called up Outlook with an email already
addressed
to
my assistant, who is the recipient of about half of the 20 or
so emails
I
send each day -- very convenient. Amazing that such a useful
feature
would
be eliminated in an "updated" version of Word!

I appreciate your replies. however.

George Lutz

"Terry Farrell" wrote:

It was never necessary to copy and paste into a blank email
in Outlook.
All
you ever needed to do from Word was to click on the Send to
Mail Recipient
tool (in either Word 2002, Word 2003 or Word 2007).

When you click on that tool, it adds the standard email
address bar to
the
top of the windows which looks and feels identical to the
blank email
in
Outlook.

In Word 2007, you need to add this command button Send Mail
to Recipient
to
the QAT because Microsoft inexplicably left it off the Send
Menu.

--
Terry Farrell - MSWord MVP

"George Lutz" George wrote
in message
...
I just chagned from Word 2003 to Word 2007. In Word 2003, I
had an
icon
in
the toolbar that allowed me to call upOutlook. I.e., I
wouudl compose
and
email in word, then select and copy it, then click on this
icno, and
an
email
opened up ready for me to paste in the text. I am pretty
sure I used
the
Customixe feature in 2002 to do this.

How can I get such an icon in 2007 to land in my Quick
Access Toolbar?

Thanks.

George Lutz



 




Thread Tools
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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.