+ Reply to Thread
Results 1 to 3 of 3

Macro copies and pastes to word doc, malfunctions if columns are hidden

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Macro copies and pastes to word doc, malfunctions if columns are hidden

    My macro, exporttojournal will copy some data from excel, open and paste it into a word document and close. The problem is if the columns are hidden I get an error saying Method 'PasteAndFormat' of object 'Range' failed. From the calculator sheet, I am copying some stuff from the R column. How can I get around this, as I want the stuff in R column to remain hidden? To run this macro yourself, you will need to put file path to a word doc in Admin Sheet A2. Hopefully that part runs for you.
    Attached Files Attached Files

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Macro copies and pastes to word doc, malfunctions if columns are hidden

    Try this - it simply unhides R then hides it again

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Macro copies and pastes to word doc, malfunctions if columns are hidden

    Thank you, it worked fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro copies and pastes to word, need to modify to copy and paste additional cell values
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2014, 10:42 AM
  2. [SOLVED] Macro copies and pastes to word, replaces entire doc rather than add to end of doc
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-05-2014, 06:09 PM
  3. Macro that copies data from one sheet and pastes it to another x columns to the right
    By Stevebarnes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2013, 12:26 PM
  4. Replies: 2
    Last Post: 12-05-2012, 10:43 PM
  5. [SOLVED] Automating a macro that copies and pastes data and pastes 2 rows under the previous one.
    By thebank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2012, 05:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1