Its been sometime since I posted my queries in this forum. New IT
policy in the compnay, proxy net connection .. i dunno what, but Im not
able to access NG's through Outlook and posting through Google is....
I have some data in word which has to be
transfered to Excel
Using Jon P's Excel to PPT automation examples I wrote the following
code in Word.
a) Problem is if I have some tables in Word then the table borders dont
get transfered to excel. Is this normal? On the other hand if I
manually copy paste from Word to Excel then do paste special and choose
HTML, one can get borders etc same as Word. if I use the syntax --
Link:=False, DisplayAsIcon:= _
then I get Compile error: named argument not found in Format above.
Why am I getting this error?
What would be the correct synax?
b) I think my Present code is equivalent to a paste special - text or
unicode text (which one is it?) Whats the different between the 2?
c) In word Iam using early binding to excel and
when I write the code
-- oExcelWorkS.Range("a1").PasteSpecial -- and immediately after
Pastespecial if I give a space then word prompts with some excel
constants - xlpasteall, xlpasteformats --etc, but when I use any of
these then I get a runtime error at this line (1004) -- paste special
method of range class failed? Why is this happening
'Set the reference to Microsoft Excel 11.0
Object library (or
depending on your version of Office) in Tools - References
Dim oExcel As Excel.Application
Dim oExcelWorkB As Excel.Workbook
Dim oExcelWorkS As Excel.Worksheet
Dim fileName As Double
Application.ScreenUpdating = False
Set oExcel = CreateObject("excel.application")
oExcel.Visible = msoTrue
Set oExcelWorkB = oExcel.Workbooks.Add
Set oExcelWorkS = oExcelWorkB.Worksheets("sheet1")
fileName = Now()
.SaveAs "d:Time Stamp - " & fileName & ".xls"
Set oExcel = Nothing
Set oExcelWorkB = Nothing
Set oExcelWorkS = Nothing
Application.ScreenUpdating = True