+ Reply to Thread
Results 1 to 2 of 2

copy table in a word to excel

  1. #1
    Forum Contributor
    Join Date
    07-05-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    100

    copy table in a word to excel

    Hi ,

    I want to copy information in a word table in to a excel sheet. When I do a normal copy paste it does not copy in the excel in the format I want. As attached there is a table in the “word copy.doc.”
    I want to copy them into the excel sheet as in the format of “What I want.xls”

    But when I do a normal copy and paste, it copies in the format as in “What I get from normal copy paste.xls”, but this is not the format I want . I want the format as in the “What I want.xls”

    Could anybody suggest me way such as a macro please ?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-05-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    100

    Re: copy table in a word to excel

    Quote Originally Posted by naflas View Post
    Hi ,

    I want to copy information in a word table in to a excel sheet. When I do a normal copy paste it does not copy in the excel in the format I want. As attached there is a table in the “word copy.doc.”
    I want to copy them into the excel sheet as in the format of “What I want.xls”

    But when I do a normal copy and paste, it copies in the format as in “What I get from normal copy paste.xls”, but this is not the format I want . I want the format as in the “What I want.xls”

    Could anybody suggest me way such as a macro please ?
    See the answer below.

    Sub BRsTable()
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^p"
    .Replacement.Text = "<ENTER>"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^t"
    .Replacement.Text = "<TAB>"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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