Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macro doesn't work
Okay - I have tried this over and over again.
I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#2
|
|||
|
|||
See
http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#3
|
|||
|
|||
Hate to say this but this doesn't help me, as I typed before - I do not
visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#4
|
|||
|
|||
When you record a macro, you are using VBA (Visual Basic for Applications).
The first of the links "garfield-n-odie" provided offers you a ready-made macro. The second explains how to install that macro in Word. We cannot reach out and press keys on your keyboard; you have to be willing to do some of the work yourself. You might also get some help in cleaning up the macro you recorded from the article at http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Anna" wrote in message ... Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#5
|
|||
|
|||
The macro code you want is:
Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#6
|
|||
|
|||
Hi there,
I followed your instructions, but it still isn't working for me. What am I doing wrong? It would really be helpful if this feature worked! Thanks in advance for your help. "Graham Mayor" wrote: The macro code you want is: Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#7
|
|||
|
|||
In what way doesn't it work? Do you have something on the clipboard to paste
before using it? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Hi there, I followed your instructions, but it still isn't working for me. What am I doing wrong? It would really be helpful if this feature worked! Thanks in advance for your help. "Graham Mayor" wrote: The macro code you want is: Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#8
|
|||
|
|||
Yes. I copy text, record the macro, then try the keyboard shortcut (which
doesn't work, of course), so then I copy your suggestion below (removing the brackets, of course) and go into Visual Basic to edit the macro, and paste your suggestion in on top of the text that's there, so that your text is the only thing in the macro. Then I save it, and close VB. Then I copy more text and try the keyboard shortcut to paste it, and nothing happens. Nothing pastes at all, formatted or unformatted. When I go back into VB to see what's going on, the new macro named "PasteUnfText" gives me an error message that says "Compile error: Ambiguous name detected: PasteUnfText." It won't even let me delete that macro because it keeps giving me that error message. What am I doing wrong? "Graham Mayor" wrote: In what way doesn't it work? Do you have something on the clipboard to paste before using it? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Hi there, I followed your instructions, but it still isn't working for me. What am I doing wrong? It would really be helpful if this feature worked! Thanks in advance for your help. "Graham Mayor" wrote: The macro code you want is: Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#9
|
|||
|
|||
From the vba editor run reset. This will cancel the error message and
allow you to delete the macro - then you can see where what you have done differs from http://www.gmayor.com/installing_macro.htm If Debug compile normal still won't accept the macro name - it should - then change the macroname to eg MyPaste() -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Yes. I copy text, record the macro, then try the keyboard shortcut (which doesn't work, of course), so then I copy your suggestion below (removing the brackets, of course) and go into Visual Basic to edit the macro, and paste your suggestion in on top of the text that's there, so that your text is the only thing in the macro. Then I save it, and close VB. Then I copy more text and try the keyboard shortcut to paste it, and nothing happens. Nothing pastes at all, formatted or unformatted. When I go back into VB to see what's going on, the new macro named "PasteUnfText" gives me an error message that says "Compile error: Ambiguous name detected: PasteUnfText." It won't even let me delete that macro because it keeps giving me that error message. What am I doing wrong? "Graham Mayor" wrote: In what way doesn't it work? Do you have something on the clipboard to paste before using it? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Hi there, I followed your instructions, but it still isn't working for me. What am I doing wrong? It would really be helpful if this feature worked! Thanks in advance for your help. "Graham Mayor" wrote: The macro code you want is: Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
#10
|
|||
|
|||
Macro doesn't work
It works now!!! Thank you so much for your help. I followed your latest
instructions and then redid the whole process. However, I was still having trouble because, though the macro worked when I clicked Run from VB, the keyboard shortcut wasn't working. So, I recorded another new macro to assign the keyboard shortcut -- and somehow, the correct code was in there when I checked it in VB! So, I guess to get this to work, you have to set up the PasteUnfText macro before recording another new macro assigning the keyboard shortcut in order for the proper code to write itself. In any case, that's what worked for me. Thanks again! "Graham Mayor" wrote: From the vba editor run reset. This will cancel the error message and allow you to delete the macro - then you can see where what you have done differs from http://www.gmayor.com/installing_macro.htm If Debug compile normal still won't accept the macro name - it should - then change the macroname to eg MyPaste() -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Yes. I copy text, record the macro, then try the keyboard shortcut (which doesn't work, of course), so then I copy your suggestion below (removing the brackets, of course) and go into Visual Basic to edit the macro, and paste your suggestion in on top of the text that's there, so that your text is the only thing in the macro. Then I save it, and close VB. Then I copy more text and try the keyboard shortcut to paste it, and nothing happens. Nothing pastes at all, formatted or unformatted. When I go back into VB to see what's going on, the new macro named "PasteUnfText" gives me an error message that says "Compile error: Ambiguous name detected: PasteUnfText." It won't even let me delete that macro because it keeps giving me that error message. What am I doing wrong? "Graham Mayor" wrote: In what way doesn't it work? Do you have something on the clipboard to paste before using it? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wordlover wrote: Hi there, I followed your instructions, but it still isn't working for me. What am I doing wrong? It would really be helpful if this feature worked! Thanks in advance for your help. "Graham Mayor" wrote: The macro code you want is: Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial DataType:=wdPasteText, Placement:= _ wdInLine End oops: Beep End Sub http://www.gmayor.com/installing_macro.htm explains how to use this listing in simple terms. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anna wrote: Hate to say this but this doesn't help me, as I typed before - I do not visual basics at all. "garfield-n-odie" wrote: See http://groups-beta.google.com/group/...bce5771fb2da20 and http://www.gmayor.com/installing_macro.htm . Anna wrote: Okay - I have tried this over and over again. I want to create a macro that will paste in unformated text. I record the macro and it seems to go well but then I test it and it is like I never recorded anything. What is wrong? Here is what I do: - Copy text - Tools to Macro to record macro - Choose a name, place it on my toolbar and then close - I start to record using only my keybord. - It pastes fine. I stop recording. Then I test it and it fails. I do not visusal basics at all so suggesting that will not help me unless I get step by step instructions. Thanks to whoever takes on my crisis. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Recording a Macro to Delete A Day's Work | New Users | |||
CPU Usage When working with a Template I Created | Microsoft Word Help | |||
macro doesn't work when I unprotect form | Formatting Long Documents | |||
Getting Spell Check Macro to work | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |