Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / November 2007

Tip: Looking for answers? Try searching our database.

Unformatted Paste

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Boorman - 24 Oct 2007 22:32 GMT
When I used Word 2003, I created a one-line macro for pasting unformatted text:

 (Selection.PasteSpecial DataType:=wdPasteText),
...and I assigned it the keyboard shortcut "Ctrl+d". For me, this was truly an indispensible tool.

I now use Word 2007, and unfortunately my macro doesn't work. Word 2007 has a new feature that is supposed to make such a macro unnecessary. In the Word 2007 Advanced Options page, there are three options for pasting text.

 a.. Keep Source Formatting
 b.. Match Destination Formatting
 c.. Keep Text Only
I've experimented with these settings, but I've found them to be too restrictive. So, I now find myself clicking "Past" on the Clipboard tab on the Home ribbon, and then "Paste Special" and then "Unformatted Text," which is cumbersome.

Can someone tell me how I can assign the unformatted paste functionality to keyboard shortcut "Ctrl+d"?



Thanks,

Chris Boorman.
Graham Mayor - 25 Oct 2007 05:50 GMT
The macro

Sub PasteUnfText()
   On Error GoTo Oops
   Selection.PasteSpecial DataType:=wdPasteText, Placement:= _
       wdInLine
   End
Oops:
Beep
End Sub

works in both Word 2003 and 2007
and the edit > paste special function is already assigned to ALT+CTRL+V

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

>When I used Word 2003, I created a one-line macro for pasting unformatted
>text:
[quoted text clipped - 17 lines]
>Thanks,
>Chris Boorman.
Chris Boorman - 29 Oct 2007 21:00 GMT
Thanks.

I'd like to have this same functionality in Outlook 2007 (i.e., when editing
an e-mail message, have the Ctrl+d shortdcut produce an unformatted paste).
Can you help me with that too?

Chris Boorman.

--------------------------------------------------------------------------------

> The macro
>
[quoted text clipped - 31 lines]
>>Thanks,
>>Chris Boorman.
Chris Boorman - 29 Oct 2007 21:15 GMT
It seems like Outlook 2007 is using Word 2007 as its editor (the same
features and dialog boxes are there), but I'm blocked from accessing the
Word object model.

*    Is there a way to "unblock" access to the Word object model?
*    Is there another object model that I can access?

--------------------------------------------------------------------------

> Thanks.
>
[quoted text clipped - 41 lines]
>>>Thanks,
>>>Chris Boorman.
Tony Jollans - 30 Oct 2007 13:34 GMT
I'm not quite sure what you mean by blocked, but ,,,

Outlook 2007 runs its own instance of an editor using the core of Word. It
has some functionality of its own but it is enhanced if you also have Word
2007 on the same machine. The Word Editor in Outlook runs under the
Inspector you are using at the time, and you gain access to it through ...

   Application.ActiveInspector.WordEditor

(or something similar depending on exactly what you are doing). This
actually gives you a Word Document Object from where all the available parts
of the Word OM can be accessed.

Signature

Enjoy,
Tony

> It seems like Outlook 2007 is using Word 2007 as its editor (the same
> features and dialog boxes are there), but I'm blocked from accessing the
[quoted text clipped - 50 lines]
>>>>Thanks,
>>>>Chris Boorman.
Chris Boorman - 31 Oct 2007 01:24 GMT
Thanks Tony.

I can see the ActiveInspector object in the Outlook object model, and I can
see that it has a WordEditor property, which is of type "object," but I
can't see how to get a handle to the Word Application object?

My VBA project doesn't reference the Word library (C:\Program
Files\Microsoft Office\Office12\MSWORD.OLB), and I can't see how to do make
it do that. I figure that I've got to include the Word library in my project
in order to access its objects, don't I?

Chris.

----------------------------------------------------

> I'm not quite sure what you mean by blocked, but ,,,
>
[quoted text clipped - 63 lines]
>>>>>Thanks,
>>>>>Chris Boorman.
Tony Jollans - 31 Oct 2007 02:02 GMT
The WordEditor object is a Word Document - and its Parent is the Word
Application object.

I don't have any problem adding a reference to the Word library. What
happens when you try? Or is it not listed? Or what?

Signature

Enjoy,
Tony

> Thanks Tony.
>
[quoted text clipped - 81 lines]
>>>>>>Thanks,
>>>>>>Chris Boorman.
Chris Boorman - 02 Nov 2007 01:34 GMT
I'm using Outlook's default IDE - Microsoft Visual Basic 6.5, and I can't
find any way of referencing any other library?

You say you have no difficulty adding a reference to the Word library.Are
you using Visual Studio (and not the default IDE)?

Thanks,

Chris.

---------------------------------------------------------------

> The WordEditor object is a Word Document - and its Parent is the Word
> Application object.
[quoted text clipped - 87 lines]
>>>>>>>Thanks,
>>>>>>>Chris Boorman.
Graham Mayor - 02 Nov 2007 06:28 GMT
From Outlook - F11 > Tools > References?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> I'm using Outlook's default IDE - Microsoft Visual Basic 6.5, and I
> can't find any way of referencing any other library?
[quoted text clipped - 115 lines]
>>>>>>>> Thanks,
>>>>>>>> Chris Boorman.
Chris Boorman - 07 Nov 2007 22:04 GMT
Pressing F11 in Outlook 2007 just moves the cursor into the "Search address
books" field. I checked the "Tools" menu, and found that there is no
"References" tab or button.I also checked "Tools > Options," and found
nothing.

> From Outlook - F11 > Tools > References?
>
[quoted text clipped - 117 lines]
>>>>>>>>> Thanks,
>>>>>>>>> Chris Boorman.
Chris Boorman - 07 Nov 2007 23:05 GMT
I just figured it out.
Here's why I was unable to figure it out earlier:

When I sit down and start using my computer each day, for some strange
reason, a VB Editor is open on my desktop - and it's not the same one that
appears when you click "Visual Basic" from within the Outlook Editor. I had
been trying to find "Tools > References" in that version of the editor (I
don't know which version it was (it didn't even have a toolbar)).

Now that I've got the correct version of the Microsoft Visual Basic Editor
(version 6.5) in front of me, I now am able to click "Tools > References,"
and check-off the Microsoft Word 2007 Object Library.

> Pressing F11 in Outlook 2007 just moves the cursor into the "Search
> address books" field. I checked the "Tools" menu, and found that there is
[quoted text clipped - 122 lines]
>>>>>>>>>> Thanks,
>>>>>>>>>> Chris Boorman.
William Chadwick - 21 Nov 2007 15:02 GMT
Well, now when I run the Macro from a MS Outlook email composition screen, it
pastes unformatted into the Word document I also happen to have open.

How do we write the code so that it pastes unformatted into the message
instead of finding an open Word document and pasting there?

Here's my code:

Sub PasteUnformatted()
   Selection.PasteSpecial DataType:=wdPasteText
End Sub

William

> I just figured it out.
> Here's why I was unable to figure it out earlier:
[quoted text clipped - 135 lines]
> >>>>>>>>>> Thanks,
> >>>>>>>>>> Chris Boorman.
Tony Jollans - 22 Nov 2007 08:30 GMT
I'm not quite sure what you are doing and you aren't providing much detail,
but you need to qualify "Selection". Written as it is, without
qualification, it refers to the selection within some default window; if you
want it to work on a specific Window you must be more explicit about it.

Signature

Enjoy,
Tony

> Well, now when I run the Macro from a MS Outlook email composition screen,
> it
[quoted text clipped - 159 lines]
>> >>>>>>>>>> Thanks,
>> >>>>>>>>>> Chris Boorman.
William Chadwick - 23 Nov 2007 17:17 GMT
I am not a VB programmer (or VBA) or a Windows programmer. I'm actually a
Java/Actionscript/javascript programmer.

I'm not sure how to get a handle on the email that has the focus.

I want to paste unformatted in my emails with a macro tied to a keyboard
shortcut (like Ctrl + d) because sometimes I *do* want to paste formatted
(which means I don't want to make the change to never pasting unformatted).

I used that little snippit in a Word macro for several years now to paste
unformatted in emails or work. It always pasted in the document that
currently has the focus. (Selection.PasteSpecial DataType:=wdPasteText)

But now that I have started using the "new and improved" office 2007, my
little macro doesn't work.

Any help on pasting unformatted would be nice.

thanks,
William Chadwick

> I'm not quite sure what you are doing and you aren't providing much detail,
> but you need to qualify "Selection". Written as it is, without
[quoted text clipped - 164 lines]
> >> >>>>>>>>>> Thanks,
> >> >>>>>>>>>> Chris Boorman.
Tony Jollans - 27 Nov 2007 08:58 GMT
I'm still not quite sure what you are doing - or where your macro is - so
this is guesswork.

In office 2007 you do not use Word as the editor in Outlook. There were many
problems with it and now Outlook has its own version of the Word Editor so
that nothing you do in Word interferes with Outlook and vice-versa. I
suspect that this is at the root of your problem. If you want to run a macro
in Outlook it must be in Outlook not in Word and you  have a separate Normal
Template (NormalEmail.dotm) which you may be able to use.

Signature

Enjoy,
Tony

>I am not a VB programmer (or VBA) or a Windows programmer. I'm actually a
> Java/Actionscript/javascript programmer.
[quoted text clipped - 209 lines]
>> >> >>>>>>>>>> Thanks,
>> >> >>>>>>>>>> Chris Boorman.
Chris Boorman - 30 Nov 2007 04:41 GMT
I finally got it working. Here it is.

Sub UPaste07()
'   Pastes the Clipboard` contents as unformatted plain text.
'   Replaces the old verson :
'   Selection.PasteSpecial DataType:=wdPasteText

   On Error GoTo Oops

   Dim WordDoc As Word.Document
   Dim WordApp As Word.Application

   Set WordDoc = ActiveInspector.WordEditor
   Set WordApp = WordDoc.Application

   WordApp.Selection.PasteSpecial DataType:=wdPasteText,
Placement:=wdInLine

   End

Oops:
   Beep

End Sub

> I'm not quite sure what you mean by blocked, but ,,,
>
[quoted text clipped - 63 lines]
>>>>>Thanks,
>>>>>Chris Boorman.
Chris Boorman - 30 Nov 2007 06:42 GMT
Now I'd like to assign this macro to Ctrl+d in the Outlook Editor. By
default, Ctrl+d is assigned to the Font dialog. Can anyone tell me how to
override that setting and re-assign Ctrl+d to a macro?

Chris.

>I finally got it working. Here it is.
>
[quoted text clipped - 91 lines]
>>>>>>Thanks,
>>>>>>Chris Boorman.
Suzanne S. Barnhill - 30 Nov 2007 15:27 GMT
If you assign Ctrl+D to a macro, that setting will override the default one.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

> Now I'd like to assign this macro to Ctrl+d in the Outlook Editor. By
> default, Ctrl+d is assigned to the Font dialog. Can anyone tell me how to
[quoted text clipped - 97 lines]
>>>>>>>Thanks,
>>>>>>>Chris Boorman.
Chris Boorman - 30 Nov 2007 18:54 GMT
Then my problem is - how do you assign a shortcut key combo to a macro in
the Outlook 2007 Editor?
It was easy before Office 2007.

Chris Boorman.

> If you assign Ctrl+D to a macro, that setting will override the default
> one.
[quoted text clipped - 100 lines]
>>>>>>>>Thanks,
>>>>>>>>Chris Boorman.
Suzanne S. Barnhill - 30 Nov 2007 20:44 GMT
Now that I don't know, but surely someone in the six! NGs you cross-posted
to will be able to tell you.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

> Then my problem is - how do you assign a shortcut key combo to a macro in
> the Outlook 2007 Editor?
[quoted text clipped - 106 lines]
>>>>>>>>>Thanks,
>>>>>>>>>Chris Boorman.
Tony Jollans - 30 Nov 2007 21:32 GMT
I don't think you can do it.

Outlook itself does not support hotkey customization - although there is a
trick using toolbars - and the Word editor in Outlook 2007 doesn't seem to
support key bindings.

Signature

Enjoy,
Tony

> Now that I don't know, but surely someone in the six! NGs you cross-posted
> to will be able to tell you.
[quoted text clipped - 109 lines]
>>>>>>>>>>Thanks,
>>>>>>>>>>Chris Boorman.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.