Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi,
Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
On Sat, 30 May 2009 02:56:00 -0700, Stephen
wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
The only time I've gotten that message is when some very long text is
on the Clipboard (and the message refers to the largeness of the material), so it's not normal behavior for Word to ask about it, so there must be some way to turn off the prompt! In Office? In Windows? On May 30, 11:33*am, Jay Freedman wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. *I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (seehttp://www.gmayor.com/installing_macro.htmif needed): Sub AutoClose() * * Dim MyData As DataObject * * If Documents.Count 2 Then * * * * ' clear clipboard * * * * Set MyData = New DataObject * * * * MyData.SetText "" * * * * MyData.PutInClipboard * * * * Set MyData = Nothing * * End If End Sub -- Regards, Jay Freedman Microsoft Word MVP * * * *FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
When you copy something onto the clipboard, it is put there in several
formats (the Paste Special list of formats gives an indication of the formats that are there). Some of those formats are actually 'on the clipboard' (that is in some Windows memory somewhere) in full, and some of them are just stubs with a marker to get the full data, if required, from the application that placed the data there. If you have put something on the clipboard from Word, and one of the formats it chooses to use is such a stub, and then you close Word, Word recognises that it won't be around, should you later try to paste the item in that format, so it asks you if you will want it, and if you say yes, it will put the data there in full. The criteria Word uses when deciding how to put data on the clipboard are not documented (AFAIK) and may depend on many factors, size being but one. Perhaps, and this is sheer guesswork on my part, it is less inclined to copy full data on a machine with limited resources, so some people may see the message more than others. Perhaps, of course, Stephen regularly copies large items. -- Enjoy, Tony www.WordArticles.com "grammatim" wrote in message ... The only time I've gotten that message is when some very long text is on the Clipboard (and the message refers to the largeness of the material), so it's not normal behavior for Word to ask about it, so there must be some way to turn off the prompt! In Office? In Windows? On May 30, 11:33 am, Jay Freedman wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (seehttp://www.gmayor.com/installing_macro.htmif needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
My experience is that the message appears most often when the copied information
includes embedded graphics files. In testing the macro I posted, all I needed to copy in order to trigger the message was the standard =rand() text plus two JPG images. I don't think it had much to do with resources, either, as this is a reasonably robust PC. -- Jay On Sat, 30 May 2009 18:05:14 +0100, "Tony Jollans" My forename at my surname dot com wrote: When you copy something onto the clipboard, it is put there in several formats (the Paste Special list of formats gives an indication of the formats that are there). Some of those formats are actually 'on the clipboard' (that is in some Windows memory somewhere) in full, and some of them are just stubs with a marker to get the full data, if required, from the application that placed the data there. If you have put something on the clipboard from Word, and one of the formats it chooses to use is such a stub, and then you close Word, Word recognises that it won't be around, should you later try to paste the item in that format, so it asks you if you will want it, and if you say yes, it will put the data there in full. The criteria Word uses when deciding how to put data on the clipboard are not documented (AFAIK) and may depend on many factors, size being but one. Perhaps, and this is sheer guesswork on my part, it is less inclined to copy full data on a machine with limited resources, so some people may see the message more than others. Perhaps, of course, Stephen regularly copies large items. -- Enjoy, Tony www.WordArticles.com "grammatim" wrote in message ... The only time I've gotten that message is when some very long text is on the Clipboard (and the message refers to the largeness of the material), so it's not normal behavior for Word to ask about it, so there must be some way to turn off the prompt! In Office? In Windows? On May 30, 11:33 am, Jay Freedman wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (seehttp://www.gmayor.com/installing_macro.htmif needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
My experience is that the message appears most often when the copied
information includes embedded graphics files. That has been my experience, too. But as Word's criteria are undocumented, there may be some circumstances when it always happens, and some when it may only happen sometimes, depending on other criteria. I'm only guessing :-) -- Enjoy, Tony www.WordArticles.com "Jay Freedman" wrote in message ... My experience is that the message appears most often when the copied information includes embedded graphics files. In testing the macro I posted, all I needed to copy in order to trigger the message was the standard =rand() text plus two JPG images. I don't think it had much to do with resources, either, as this is a reasonably robust PC. -- Jay On Sat, 30 May 2009 18:05:14 +0100, "Tony Jollans" My forename at my surname dot com wrote: When you copy something onto the clipboard, it is put there in several formats (the Paste Special list of formats gives an indication of the formats that are there). Some of those formats are actually 'on the clipboard' (that is in some Windows memory somewhere) in full, and some of them are just stubs with a marker to get the full data, if required, from the application that placed the data there. If you have put something on the clipboard from Word, and one of the formats it chooses to use is such a stub, and then you close Word, Word recognises that it won't be around, should you later try to paste the item in that format, so it asks you if you will want it, and if you say yes, it will put the data there in full. The criteria Word uses when deciding how to put data on the clipboard are not documented (AFAIK) and may depend on many factors, size being but one. Perhaps, and this is sheer guesswork on my part, it is less inclined to copy full data on a machine with limited resources, so some people may see the message more than others. Perhaps, of course, Stephen regularly copies large items. -- Enjoy, Tony www.WordArticles.com "grammatim" wrote in message ... The only time I've gotten that message is when some very long text is on the Clipboard (and the message refers to the largeness of the material), so it's not normal behavior for Word to ask about it, so there must be some way to turn off the prompt! In Office? In Windows? On May 30, 11:33 am, Jay Freedman wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (seehttp://www.gmayor.com/installing_macro.htmif needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
I'll third that. I don't think I've ever gotten that prompt when the
Clipboard content didn't include graphics, though it's possible that if I'd copy/pasted an entire document's worth of text I might have gotten it. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Tony Jollans" My forename at my surname dot com wrote in message ... My experience is that the message appears most often when the copied information includes embedded graphics files. That has been my experience, too. But as Word's criteria are undocumented, there may be some circumstances when it always happens, and some when it may only happen sometimes, depending on other criteria. I'm only guessing :-) -- Enjoy, Tony www.WordArticles.com "Jay Freedman" wrote in message ... My experience is that the message appears most often when the copied information includes embedded graphics files. In testing the macro I posted, all I needed to copy in order to trigger the message was the standard =rand() text plus two JPG images. I don't think it had much to do with resources, either, as this is a reasonably robust PC. -- Jay On Sat, 30 May 2009 18:05:14 +0100, "Tony Jollans" My forename at my surname dot com wrote: When you copy something onto the clipboard, it is put there in several formats (the Paste Special list of formats gives an indication of the formats that are there). Some of those formats are actually 'on the clipboard' (that is in some Windows memory somewhere) in full, and some of them are just stubs with a marker to get the full data, if required, from the application that placed the data there. If you have put something on the clipboard from Word, and one of the formats it chooses to use is such a stub, and then you close Word, Word recognises that it won't be around, should you later try to paste the item in that format, so it asks you if you will want it, and if you say yes, it will put the data there in full. The criteria Word uses when deciding how to put data on the clipboard are not documented (AFAIK) and may depend on many factors, size being but one. Perhaps, and this is sheer guesswork on my part, it is less inclined to copy full data on a machine with limited resources, so some people may see the message more than others. Perhaps, of course, Stephen regularly copies large items. -- Enjoy, Tony www.WordArticles.com "grammatim" wrote in message ... The only time I've gotten that message is when some very long text is on the Clipboard (and the message refers to the largeness of the material), so it's not normal behavior for Word to ask about it, so there must be some way to turn off the prompt! In Office? In Windows? On May 30, 11:33 am, Jay Freedman wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (seehttp://www.gmayor.com/installing_macro.htmif needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi,
Thanks for your thoughts. I don't really know what the normal.dotm is, so inserting a macro might be a challenge. I'm kind of a plug-and-play guy, which is why I was looking for a box to tick. Should anyone care, I copy and paste a caption and a picture. It doesn't seem that big to me but obviously Word thinks it is big. Thanks again for trying. Take care, Stephen "Stephen" wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
I apologize profusely. I missed a step that's required for this macro, but not
generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#11
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi,
I gave it a try and it works perfectly. Thank you so very much. Take care, Stephen "Jay Freedman" wrote: I apologize profusely. I missed a step that's required for this macro, but not generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#12
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi,
I'm sorry to bother you with this again, if you are still there. Some bug seems to have happened and I lost all of my macros. Most of them were quite simple and easy to replace except, of course, yours. I went through the steps again and seem to be okay until the "Dim MyData As DataObject" problem. Now when I go to references, "Microsoft Forms 2.0 Object Library" isn't there (if they are all in alphabetical order after the first few items). It goes from "Microsoft Feeds 2.0 Object Library" to "Microsoft FrontPage 6.0 Page Object Reference Library." I tried checking the "Feeds" box but it didn't seem to help. If you could tell me what I am doing wrong, I'd really appreciate it. Thanks for all your help. Stephen "Jay Freedman" wrote: I apologize profusely. I missed a step that's required for this macro, but not generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#13
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Are you sure it isn't one of the first few that precede the alphabetic list?
-- Enjoy, Tony www.WordArticles.com "Stephen" wrote in message ... Hi, I'm sorry to bother you with this again, if you are still there. Some bug seems to have happened and I lost all of my macros. Most of them were quite simple and easy to replace except, of course, yours. I went through the steps again and seem to be okay until the "Dim MyData As DataObject" problem. Now when I go to references, "Microsoft Forms 2.0 Object Library" isn't there (if they are all in alphabetical order after the first few items). It goes from "Microsoft Feeds 2.0 Object Library" to "Microsoft FrontPage 6.0 Page Object Reference Library." I tried checking the "Feeds" box but it didn't seem to help. If you could tell me what I am doing wrong, I'd really appreciate it. Thanks for all your help. Stephen "Jay Freedman" wrote: I apologize profusely. I missed a step that's required for this macro, but not generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#14
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
If it turns out that it really isn't in the list at all, try (in the VBA
editor, with the same template project selected in the Projects pane) clicking Insert UserForm. You don't actually need the userform, but it should cause the Forms Object Library to load so the macro will work. Leaving the empty userform there won't hurt anything. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Tony Jollans wrote: Are you sure it isn't one of the first few that precede the alphabetic list? "Stephen" wrote in message ... Hi, I'm sorry to bother you with this again, if you are still there. Some bug seems to have happened and I lost all of my macros. Most of them were quite simple and easy to replace except, of course, yours. I went through the steps again and seem to be okay until the "Dim MyData As DataObject" problem. Now when I go to references, "Microsoft Forms 2.0 Object Library" isn't there (if they are all in alphabetical order after the first few items). It goes from "Microsoft Feeds 2.0 Object Library" to "Microsoft FrontPage 6.0 Page Object Reference Library." I tried checking the "Feeds" box but it didn't seem to help. If you could tell me what I am doing wrong, I'd really appreciate it. Thanks for all your help. Stephen "Jay Freedman" wrote: I apologize profusely. I missed a step that's required for this macro, but not generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#15
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
automatically delete text in clipboard on exit
Hi, Once again, thank you so much. The userform thing did make the Forms Object Library come up and it was already checked. And the macro works again. Thanks again. Stephen "Jay Freedman" wrote: If it turns out that it really isn't in the list at all, try (in the VBA editor, with the same template project selected in the Projects pane) clicking Insert UserForm. You don't actually need the userform, but it should cause the Forms Object Library to load so the macro will work. Leaving the empty userform there won't hurt anything. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Tony Jollans wrote: Are you sure it isn't one of the first few that precede the alphabetic list? "Stephen" wrote in message ... Hi, I'm sorry to bother you with this again, if you are still there. Some bug seems to have happened and I lost all of my macros. Most of them were quite simple and easy to replace except, of course, yours. I went through the steps again and seem to be okay until the "Dim MyData As DataObject" problem. Now when I go to references, "Microsoft Forms 2.0 Object Library" isn't there (if they are all in alphabetical order after the first few items). It goes from "Microsoft Feeds 2.0 Object Library" to "Microsoft FrontPage 6.0 Page Object Reference Library." I tried checking the "Feeds" box but it didn't seem to help. If you could tell me what I am doing wrong, I'd really appreciate it. Thanks for all your help. Stephen "Jay Freedman" wrote: I apologize profusely. I missed a step that's required for this macro, but not generally for most macros. The line that says "Dim MyData As DataObject" refers to a type of object that isn't built into Word. To make it available, do this: - Open the macro editor and double-click the module in the Normal.dotm template that contains the AutoClose macro. - Click the Tools menu (in the macro editor, not in Word itself) and choose References. - In the resulting dialog, scroll down the list to "Microsoft Forms 2.0 Object Library" and click its check box to activate it. - Save, then close the macro editor. You should no longer get the error message, and the clipboard should automatically be cleared -- no button or shortcut needed. On Fri, 5 Jun 2009 03:13:01 -0700, Stephen wrote: Hi, Because your website says "Idiot's Guide to Installing Macros" I felt I was qualified so I gave it a try. But I seem to be an even bigger Idiot than most because I apparently did something wrong. I know I didn't add the macro to the toolbar because, unfortunately, I have 2007. I also didn't add a shortcut or add the macro to the Quick Access Toolbar because I figure if I have to click a shortcut or the toolbar every time, it seems the same to me as clicking the dialogue box. I was hoping it would run automatically on exit. If it isn't supposed to run automatically, thanks anyway for trying. If it is suppose to run automatically, then I obviously did something wrong. When I try to exit now, I get a Microsoft Visual Basic box that says: "Compile error: User-defined type not defined." I, of course, have no clue what this means but possibly someone else does. Thanks, Stephen "Jay Freedman" wrote: On Sat, 30 May 2009 02:56:00 -0700, Stephen wrote: Hi, Every time I exit Word 2007, I get a box that asks me if I want to keep the text in the clipboard for other applications. I never want to keep the text in the clipboard, so does anyone possibly know of some way that I can tick some box so that I'll never be asked that again. Thanks for any help. Stephen There's no way to "tick some box" to turn off the prompts. You need a macro to clear the clipboard before exiting from Word. Put this macro into a module in the Normal.dotm template (see http://www.gmayor.com/installing_macro.htm if needed): Sub AutoClose() Dim MyData As DataObject If Documents.Count 2 Then ' clear clipboard Set MyData = New DataObject MyData.SetText "" MyData.PutInClipboard Set MyData = Nothing End If End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete button inserts from clipboard | Microsoft Word Help | |||
Selected item doesn't automatically copy to clipboard | Microsoft Word Help | |||
how to I save a file automatically on exit | Microsoft Word Help | |||
When I select text it does not automatically delete when I press a | Microsoft Word Help | |||
How do I delete Word (2003) text that pops up automatically when . | Microsoft Word Help |