#1   Report Post  
Anna
 
Posts: n/a
Default 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   Report Post  
garfield-n-odie
 
Posts: n/a
Default

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   Report Post  
Anna
 
Posts: n/a
Default

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   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
wordlover
 
Posts: n/a
Default

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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
wordlover
 
Posts: n/a
Default

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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
wordlover
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording a Macro to Delete A Day's Work Teri D MT New Users 14 September 23rd 21 09:44 PM
CPU Usage When working with a Template I Created KM1 Microsoft Word Help 6 May 24th 05 04:38 PM
macro doesn't work when I unprotect form mary Formatting Long Documents 1 May 3rd 05 07:35 PM
Getting Spell Check Macro to work Tom Hyland Microsoft Word Help 8 January 14th 05 06:45 PM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 02:51 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"