+ Reply to Thread
Results 1 to 3 of 3

Copying data's from Excel to Word throwing a run time error

  1. #1
    Registered User
    Join Date
    05-31-2019
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    1

    Copying data's from Excel to Word throwing a run time error

    Hi Everyone,
    This is my first post, please do help
    Here i have tried with some data that should be added from Excel to Word, later convert from Excel to Word and Good thing is that below code runs, but after executing with some sheets it throws me a run time error and code exits

    Think i have some 40 records and if i run the below code i am getting these Errors
    >On the word document '6' , my code is delayed more
    >After 10th or later, word document its throwing me the run time error 4605.
    Can anyone help me to solve this out

    Below is my code
    Please Login or Register  to view this content.
    From the above code mainly in the highlighted lines it throws me error

    Thanks in prior

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Copying data's from Excel to Word throwing a run time error

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    https://www.mrexcel.com/forum/genera...ime-error.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Copying data's from Excel to Word throwing a run time error

    Quote Originally Posted by GirishDhruv View Post
    ... From the above code mainly in the highlighted lines it throws me error ...
    1. Constants from "Word" of type "wdPasteText, wdAlignParagraphLeft, etc." are not directly supported by code running from excel.
    The fact that they work at all from the level of excel is due to the flexibility of the compiler.
    However, they can generate execution errors, so you should first declare them with the appropriate values

    2. Attach an example, resulting ".doc" file with the correct paragraph layout (of course, do not enter real data there)

    3. The ".xls" file would also be useful (of course with false data)

+ 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. Copying data from Access to Excel: "Run-time error '6' Overflow"
    By lukelucky in forum Access Tables & Databases
    Replies: 1
    Last Post: 01-11-2018, 09:09 AM
  2. Excel Macro throwing a Syntax Error and I am not sure why
    By budwong27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2017, 03:43 AM
  3. Code Throwing Run Time error...
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2016, 03:59 PM
  4. [SOLVED] Run-time error '1004' when trying to export data from Word to Excel.
    By msmithy in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 02:18 AM
  5. [SOLVED] Run Time Error 1004 when copying data
    By Sharksfan88 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-08-2012, 06:45 AM
  6. Paste Special throwing error first time
    By sid_misra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2010, 02:12 PM
  7. Data Validation throwing me a delimited error
    By ge0rge in forum Excel General
    Replies: 5
    Last Post: 03-25-2009, 01:29 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