#1
|
|||
|
|||
VBA Copy Paste Issue
Hi Team,
We are getting error in word macro, while trying to copy and paste the table content from one word document to another word document. But this is not happening all the time only few times we are getting this error. Thanks, Kiran A |
#2
|
||||
|
||||
Your template has a lot of code in it. Which macro and which line is the error occurring on?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
Frankly it would make more sense to create the template with the table elements already located and formatted rather than trying to format the document using lots of macro code. I would also recommend the use of ranges to locate the data rather than the selection object which can be a bit hit and miss, leading to the types of error you are encountering when the selection is not where they macro requires it to be.
I suggest that you declare all the variables you use rather than just some of them. It makes the code much easier to follow.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
Quote:
Attached screenshot of my macro code. I'm getting at error where i kept breakpoint. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odd copy/paste issue - | ad5624 | Word | 3 | 04-08-2021 08:11 PM |
Printer issue (and copy/paste): some pictures/text are not printed/showed | Jazz43 | Drawing and Graphics | 15 | 08-29-2016 04:17 AM |
Copy paste issue for database | klpw | Excel Programming | 1 | 01-28-2016 01:30 AM |
Copy & Paste Issue | anickles | Excel | 1 | 02-11-2015 11:32 AM |
Word 2007 Copy/Paste Excel issue | raven26c | Word | 1 | 11-18-2011 02:49 AM |