LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default RunTime error 462: Remote Server not avaliable???

With Excel and Word 2003, I'm using Excel VBA to automate a Word
document. Everything is going pretty much okay so far - except I keep
getting a Runtime 462 error - Remote server not available.

First, all this is on my own machine - there are no remote servers
involved.

Second, I did do some searching and found that this can crop up when
an object - like "range" - is not specifically declared as belonging
to either Word or Excel. So VB will choose, and may choose
incorrectly. So I went back and made sure everything involved here
was declared to an application.

Immediately before the error, I set a Word range and an Excel range,
and copy the Excel rnage into the Word doc as a table. That works
fine. Then I set an object to the table in Word and try to manipulate
it. That's when it errors.

If anyone can help me out. I would appreciate it.

Ed

Set wdRng = doc.Bookmarks("XL1").Range
wdRng.MoveEnd wdParagraph, 1
wdRng.Collapse wdCollapseEnd

Set rng = wks.Range("A2:H30")
rng.Copy
wdRng.InsertBefore Chr(13)
wdRng.Collapse wdCollapseEnd
wdRng.Paste

Set tbl = wdRng.Tables(1)
' NOTE: tbl is Dim'd as Word.Table

With tbl
.TopPadding = InchesToPoints(0.01) '*****
' When stepping through with F8, it errors when I get
' to the .TopPadding line
.BottomPadding = InchesToPoints(0.01)
.LeftPadding = InchesToPoints(0.02)
.RightPadding = InchesToPoints(0.02)
.Spacing = 0
.AllowPageBreaks = True
.AllowAutoFit = False
.Rows.Alignment = wdAlignRowCenter
.Rows.AllowBreakAcrossPages = False
.Range.Cells.VerticalAlignment = wdCellAlignVerticalCenter
.Rows.SpaceBetweenColumns = InchesToPoints(0.04)
.Rows.Height = wdRowHeightAuto
End With
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing a Remote Server pdberger Excel Programming 0 June 17th 07 07:48 PM
Runtime error '462'. The remote server doesn't exist Newbie Excel Programming 2 November 2nd 06 01:35 PM
Runtime error 91 when connecting to SQL Server 2000 Jonas[_2_] Excel Programming 1 October 19th 05 03:06 PM
RTD server on remote machine. Mike Kamzyuk Excel Programming 2 January 11th 05 12:23 PM


All times are GMT +1. The time now is 05:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"