i have a Table in excel.. i need to copy it to a selected Word Document at a Fixed Location..I am able to extract the exact location where the table is to be placed and i m also able to paste the table and format it.. but the problem arises when i re-run the same code 2nd time... this time the code shows error.. that "the remote server machine does not exist or is unavailable" wherein the word file is at my system only...
the piece of code i have written is:
dim word_application as word.application
With word_application.Application
.Selection.Paste
.Selection.MoveUp Unit:=wdLine, Count:=CountOfRows + 1, Extend:=wdExtend
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ERROR AREA...SOMETIMES CODE RUNS SOMETIMES HANGS.............
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
.Selection.Tables(1).Rows.LeftIndent = InchesToPoints(0.76)
.Selection.Tables(1).PreferredWidthType = wdPreferredWidthPoints
.Selection.Tables(1).PreferredWidth = InchesToPoints(5.56)
end with
Bookmarks