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

Programmatic plain-text insert



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 5th 07, 10:04 PM posted to microsoft.public.outlook.program_vba
BrianWren
external usenet poster
 
Posts: 1
Default Programmatic plain-text insert

I would like to create a macro, and put it on a toolbar button, that invoked
the behavior of EditPaste Special...plain text.

How do I insert in an email that is open?

Can macros be assigned to buttons on a toolbar?

--
There are exactly 10 kinds of people: Those who do- and those who don’t
understand binary.
  #2  
Old December 6th 07, 12:00 AM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Programmatic plain-text insert

You can only go so far to automate selecting the Paste Special menu item.
You can execute it as below, but you cannot control what happens with the
subsequent dialog that provides the paste options.

Dim objCBs As CommandBars
Dim objCBC As CommandBarControl
Dim objCB As CommandBar


Set objCBs = Application.ActiveInspector.CommandBars
Set objCB = objCBs("Menu Bar")
Set objCBC = objCB.FindControl(, 30003) 'Edit menu

For Each objCBC In objCBC.Controls
If objCBC.ID = 755 Then 'Paste Special
objCBC.Execute
Exit Sub
End If
Next

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"BrianWren" wrote:

I would like to create a macro, and put it on a toolbar button, that invoked
the behavior of EditPaste Special...plain text.

How do I insert in an email that is open?

Can macros be assigned to buttons on a toolbar?

--
There are exactly 10 kinds of people: Those who do- and those who don’t
understand binary.

  #3  
Old February 12th 08, 04:47 PM posted to microsoft.public.outlook.program_vba
Cerveja
external usenet poster
 
Posts: 2
Default Programmatic plain-text insert

Awesome. Thanks Eric. I have been hitting "ALT + E + S" to trigger Paste
special as with Word and it sends my incomplete email. Thanks.

"Eric Legault [MVP - Outlook]" wrote:

You can only go so far to automate selecting the Paste Special menu item.
You can execute it as below, but you cannot control what happens with the
subsequent dialog that provides the paste options.

Dim objCBs As CommandBars
Dim objCBC As CommandBarControl
Dim objCB As CommandBar


Set objCBs = Application.ActiveInspector.CommandBars
Set objCB = objCBs("Menu Bar")
Set objCBC = objCB.FindControl(, 30003) 'Edit menu

For Each objCBC In objCBC.Controls
If objCBC.ID = 755 Then 'Paste Special
objCBC.Execute
Exit Sub
End If
Next

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"BrianWren" wrote:

I would like to create a macro, and put it on a toolbar button, that invoked
the behavior of EditPaste Special...plain text.

How do I insert in an email that is open?

Can macros be assigned to buttons on a toolbar?

--
There are exactly 10 kinds of people: Those who do- and those who don’t
understand binary.

 




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
Plain Text Mail HockeyPlayer Outlook - Using Contacts 3 October 9th 07 04:47 AM
Difference within HTML/Rich Text/Plain Text vt003 Outlook - General Queries 1 October 3rd 07 07:30 PM
Plain Text Ike Fontenot Outlook Express 3 January 1st 07 02:46 AM
insert as text (to insert html into email body) Iona Outlook - General Queries 1 July 13th 06 01:10 PM
problem with rich text (HTML)/plain text Jam Sr Outlook Express 2 July 8th 06 01:50 AM


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