Transfer Text from Word to Excel in next row available

Muhammad_Bilal

New Member
Joined
Sep 1, 2017
Messages
14
I am working on 'Word Document' where a text is selected and converted into variable let say CCC.


I want to transfer this CCC to 'Excel Workbook' Sheet1 in next empty row.


I am trying following code but it seem not doing anything:


Code:
Set CCC= Selection.Range.PARAGRAPHS(1).Range
    Set MyXL = CreateObject("Excel.Application")
    MyXL.Visible = True
    Set eXwb = MyXL.Workbooks.Open("C:\Users\dell\Desktop\WEBD\LIST.xlsm")
    With eXwb.Application
            .Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).FormulaR1C1 = CCC
    End With

Before that I was using following code which was working fine and I want to improve it so:


Code:
With eXwb.Application
         .Sheets("Sheet1").Select
         .ActiveCell.FormulaR1C1 = CCC
         .ActiveCell.Offset(1, 0).Range("A1").Select
     End With
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Without wanting to place to fine a point on it, your 'improvement' is anything but. Working with Selections is far less efficient than working with Ranges and is prone to creating a lot of screen flicker.
 
Upvote 0

Forum statistics

Threads
1,215,493
Messages
6,125,128
Members
449,206
Latest member
burgsrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top