View Single Post
  #3   Report Post  
Raven95
 
Posts: n/a
Default

Thanks for the feedback Jay. It's nice to know I wasn't going crazy.

I also noticed a reply you wrote for a similar question to GR and Daiya
Mitchell on 4/4/05. In it, you identified a method for using the Paste Option
button as a way to record a Paste Unformatted text macro that would actually
work. Thanks, I was hoping there was a way around it.

Any word on when/if Microsoft might actually get around to fixing the macro
issues? I teach Office apps to a large number of military/military affiliated
personnel. They are less than a month away from converting from Office 97,
where these macros work, to Office 2003, where it appears that many macros
won't work. A vast majority of these personnel use a lot of macros in their
daily routines. Anyway, thanks again for the help and have a great day.

Bill


"Jay Freedman" wrote:

Hi Bill,

Yes, the macro recorder is busted. I wrote a whole article about it
(http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm) and didn't
even get to this bug.

The line the recorder should give you, but never does, is

Selection.PasteSpecial DataType:=wdPasteText

I haven't tried it in PowerPoint, but I'm not surprised by what you say. :-(

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Raven95 wrote:
Good afternoon. I'm having a problem recording a simple macro in
Word. I first noticed this issue in Word XP, and now again in Word
2003. Here is what I'm trying to do. I want to copy text from a web
page and paste it, unformatted, into Word, regardless of the
formatting on the web page.

Here are the steps I'm taking:
1. Copy any text from any web page
2. In Word, start recording a macro
3. I name it PasteSpecial, assign it to the keyboard (Alt+D), and
click Close to start recording
4. I click Edit - Paste Special..., I then select "Unformatted Text"
and click OK. At this point, the text appears pasted the way I want
it, unformatted.
5. I stop the recording and test the macro by pressing Alt+D
6. The text is pasted with whatever formating was included on the web
page

Here is the resulting VBA code:
Sub PasteSpecial()
'
' PasteSpecial Macro
' Macro recorded 4/29/2005 by USAAC
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub

The problem is that the macro does not record the selection of
"Unformatted Text," but instead records the default option in the
dialog box, which is "Formatted Text (RTF)," as evidenced by the
(wdPasteDefault). It *should* read (wdFormatPlainText) based on the
Unformatted Text selection. I have recorded the macro using just the
mouse or just the keyboard, both with the same results.

Want to know what's even stranger?? If I try to record this same
macro in PowerPoint, it doesn't record my actions at all!

Here is the resulting VBA code in PowerPoint:
Sub PasteSpecial()
'
' Macro recorded 4/29/2005 by USAAC
'

End Sub


Any help would be greatly appreciated. Thanks!

Bill