PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Programmatic plain-text insert

Reply

Programmatic plain-text insert

 
Thread Tools Rate Thread
Old 05-12-2007, 09:04 PM   #1
BrianWren
Guest
 
Posts: n/a
Default Programmatic plain-text insert


I would like to create a macro, and put it on a toolbar button, that invoked
the behavior of Edit>Paste 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.
  Reply With Quote
Old 05-12-2007, 11:00 PM   #2
Eric Legault [MVP - Outlook]
Guest
 
Posts: n/a
Default RE: 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 Edit>Paste 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.

  Reply With Quote
Old 12-02-2008, 03:47 PM   #3
Cerveja
Guest
 
Posts: n/a
Default RE: 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 Edit>Paste 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.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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