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

outlook forward macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 14th 06, 02:16 PM posted to microsoft.public.outlook.program_vba
Phil Best
external usenet poster
 
Posts: 1
Default outlook forward macro

Would like to create macro to forward message adding the following text to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work out how
to add text. Would like add text to be in bold and coloured blue.
Ads
  #2  
Old July 15th 06, 08:16 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default outlook forward macro

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItem“s Forward function which returns a new MailItem
object. Then you can write into its HTMLBody property, example inserts your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following text to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work out

how
to add text. Would like add text to be in bold and coloured blue.

  #3  
Old July 17th 06, 09:07 AM posted to microsoft.public.outlook.program_vba
Phil Best
external usenet poster
 
Posts: 3
Default outlook forward macro

Dose not seem to work. Happy to admit that VB is not my best skill. I enclose
the script I am using and would be obliged if you would advise where I am
going wrong.
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set FwdItem = ThisItem.Forward
FwdItem.To = "
HTMLBody = "Your text" & vbCrLf & HTMLBody
FwdItem.Send
End Sub

"Michael Bauer" wrote:

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItemĀ“s Forward function which returns a new MailItem
object. Then you can write into its HTMLBody property, example inserts your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following text to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work out

how
to add text. Would like add text to be in bold and coloured blue.


  #4  
Old July 17th 06, 05:30 PM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default outlook forward macro

Am Mon, 17 Jul 2006 01:07:02 -0700 schrieb Phil Best:

Please write FwdItem.HTMLBody instead of HTMLBody.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Dose not seem to work. Happy to admit that VB is not my best skill. I

enclose
the script I am using and would be obliged if you would advise where I am
going wrong.
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set FwdItem = ThisItem.Forward
FwdItem.To = "
HTMLBody = "Your text" & vbCrLf & HTMLBody
FwdItem.Send
End Sub

"Michael Bauer" wrote:

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItem“s Forward function which returns a new MailItem
object. Then you can write into its HTMLBody property, example inserts

your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following text

to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work out

how
to add text. Would like add text to be in bold and coloured blue.


  #5  
Old July 18th 06, 11:18 AM posted to microsoft.public.outlook.program_vba
Phil Best
external usenet poster
 
Posts: 3
Default outlook forward macro

Michael
Made the change but the only text that appears on the forwarded email is
"Your Text". The original text disappears. Macro enclosed
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set Fwditem = ThisItem.Forward
Fwditem.To = "
Fwditem.HTMLBody = "Your Text" & vbCrLf & HTMLBody
Fwditem.Send
End Sub


"Michael Bauer" wrote:

Am Mon, 17 Jul 2006 01:07:02 -0700 schrieb Phil Best:

Please write FwdItem.HTMLBody instead of HTMLBody.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Dose not seem to work. Happy to admit that VB is not my best skill. I

enclose
the script I am using and would be obliged if you would advise where I am
going wrong.
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set FwdItem = ThisItem.Forward
FwdItem.To = "
HTMLBody = "Your text" & vbCrLf & HTMLBody
FwdItem.Send
End Sub

"Michael Bauer" wrote:

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItemĀ“s Forward function which returns a new MailItem
object. Then you can write into its HTMLBody property, example inserts

your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following text

to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work out
how
to add text. Would like add text to be in bold and coloured blue.


  #6  
Old July 18th 06, 12:32 PM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default outlook forward macro

Am Tue, 18 Jul 2006 03:18:02 -0700 schrieb Phil Best:

Fwditem.HTMLBody = "Your Text" & vbCrLf & HTMLBody


At the end is another HTMLBody which needs to be full qualified.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Michael
Made the change but the only text that appears on the forwarded email is
"Your Text". The original text disappears. Macro enclosed
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set Fwditem = ThisItem.Forward
Fwditem.To = "
Fwditem.HTMLBody = "Your Text" & vbCrLf & HTMLBody
Fwditem.Send
End Sub


"Michael Bauer" wrote:

Am Mon, 17 Jul 2006 01:07:02 -0700 schrieb Phil Best:

Please write FwdItem.HTMLBody instead of HTMLBody.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Dose not seem to work. Happy to admit that VB is not my best skill. I

enclose
the script I am using and would be obliged if you would advise where I

am
going wrong.
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set FwdItem = ThisItem.Forward
FwdItem.To = "
HTMLBody = "Your text" & vbCrLf & HTMLBody
FwdItem.Send
End Sub

"Michael Bauer" wrote:

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItem“s Forward function which returns a new

MailItem
object. Then you can write into its HTMLBody property, example inserts

your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML

tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following

text
to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work

out
how
to add text. Would like add text to be in bold and coloured blue.


  #7  
Old July 18th 06, 01:45 PM posted to microsoft.public.outlook.program_vba
Phil Best
external usenet poster
 
Posts: 3
Default outlook forward macro

Michael
Many thanks for your help. All now working.

"Michael Bauer" wrote:

Am Tue, 18 Jul 2006 03:18:02 -0700 schrieb Phil Best:

Fwditem.HTMLBody = "Your Text" & vbCrLf & HTMLBody


At the end is another HTMLBody which needs to be full qualified.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Michael
Made the change but the only text that appears on the forwarded email is
"Your Text". The original text disappears. Macro enclosed
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set Fwditem = ThisItem.Forward
Fwditem.To = "
Fwditem.HTMLBody = "Your Text" & vbCrLf & HTMLBody
Fwditem.Send
End Sub


"Michael Bauer" wrote:

Am Mon, 17 Jul 2006 01:07:02 -0700 schrieb Phil Best:

Please write FwdItem.HTMLBody instead of HTMLBody.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Dose not seem to work. Happy to admit that VB is not my best skill. I
enclose
the script I am using and would be obliged if you would advise where I

am
going wrong.
Sub Forward()
On Error Resume Next
Set ThisItem = Application.ActiveInspector.CurrentItem
Set FwdItem = ThisItem.Forward
FwdItem.To = "
HTMLBody = "Your text" & vbCrLf & HTMLBody
FwdItem.Send
End Sub

"Michael Bauer" wrote:

Am Fri, 14 Jul 2006 06:16:03 -0700 schrieb Phil Best:

You can call an MailItemĀ“s Forward function which returns a new

MailItem
object. Then you can write into its HTMLBody property, example inserts
your
text at the top:

HTMLBody = "Your text" & vbCRLF & HTMLBody

For the formatting you need to enclose your text in the proper HTML

tags.
b is for bold, color=#0000ff is for blue.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Would like to create macro to forward message adding the following

text
to
body.
"Sue"
"Please approve enclosed forecast change request and forward to Bops"
"Regards"
"Phil"
Writing macro to forward is straight forward but struggling to work

out
how
to add text. Would like add text to be in bold and coloured blue.



 




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
Hotmail forward to Outlook XP? ~~Nightcrawler~~ Outlook - General Queries 2 March 30th 06 05:10 AM
how to forward a distribution list in outlook Maggie D Outlook - Using Contacts 1 February 27th 06 10:24 PM
macro to forward Dan Outlook and VBA 8 February 23rd 06 07:22 PM
Forward all e-mails from Outlook Maxim Kazitov Add-ins for Outlook 1 January 15th 06 10:43 PM
Forward e-mail from Outlook Maxim Kazitov Outlook - General Queries 3 January 13th 06 01:37 PM


All times are GMT +1. The time now is 03:36 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.