LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Excel Macro Errors - it just doesn't like Word

Hi guys,

I'm not sure if this can even be done so please excuse my ignorance if it
can't.

I currently have a macro that is used to clean phone numbers. This is a Word
macro and is used to remove all non numerical characters.

I receive an Excel spreadsheet that contains a whack of phone numbers in a
number of fields. I want to clean these phone numbers by using a macro to
copy from excel to word, clean with the word macro, and then return back to
the relevant excel column.

The Word macro doesn't like to play ball like this. Works fine if I do it
manually (copy the column, paste it into Word, run the macro, copy it back
and then paste it into a text column) but when I try to test it with the
excel macro, it's a no go.

I receive an error message - Run-time error '1004': Pastespecial method of
Worksheet class failed.

I presume (seeing as word didn't even open) that this aspect just didn't
happen, hence causing the problem.

I can't perform the clean in Excel as it removes all leading zeros, which I
need....

Any help, or a simple 'No chance champ', is appreciated.

Thanks,
Chaps.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Visual Basic errors displaid when opening Microsoft Word 97 & Excel (7 JJ mac Setting up and Configuration of Excel 7 June 14th 07 06:54 PM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
Print errors with Word documents in Excel spreadsheets mike-ss Excel Discussion (Misc queries) 0 August 10th 05 05:11 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM
Macro - Open Word with Excel macro Bill Excel Discussion (Misc queries) 3 May 23rd 05 11:21 PM


All times are GMT +1. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"