Error on macro running over Word 2000

  • Thread starter E. Omar Troccoli K.
  • Start date
E

E. Omar Troccoli K.

En blancoHI,

Actually, I'm getting an error message when I run some macro in Word 2000. That error is no present on the same macro running on Word XP.

The line of the code that seems to have problems is:

Selection.PasteAndFormat (wdPasteDefault)

That is higthlighted and then show and error message.

The macro works fine in Word XP, but have this problem in Word 2000.

The macro is for a template used in my office. In that, some PC's have Office XP and other have Office 2000. ¿Is there a incompatibility problem or something like this?

I need a code that works fine in Word XP and 2000. Any help will be so much apreciated.

Regards,


Omar
 
J

Jonathan West

En blancoHi Omar,

The reason you get that error is that the PasteAndFormat command isn't
available in Word 2000. You need to use the Paste method or the PasteSpecial
method instead. Both of those work in Word 2000 and Word 2002 (Word XP)

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com


HI,

Actually, I'm getting an error message when I run some macro in Word 2000.
That error is no present on the same macro running on Word XP.

The line of the code that seems to have problems is:

Selection.PasteAndFormat (wdPasteDefault)

That is higthlighted and then show and error message.

The macro works fine in Word XP, but have this problem in Word 2000.

The macro is for a template used in my office. In that, some PC's have
Office XP and other have Office 2000. ¿Is there a incompatibility problem or
something like this?

I need a code that works fine in Word XP and 2000. Any help will be so much
apreciated.

Regards,


Omar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top