我试图运行以下
Sub SkrivaUt()
Dim wordapp As Word.Application
Dim WordDoc As Word.Document
Set wordapp = CreateObject("Word.Application")
Set WordDoc = wordapp.documents.Add
wordapp.Visible = True
With wordapp.Selection.PageSetup
'.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(1)
.BottomMargin = CentimetersToPoints(1)
.LeftMargin = CentimetersToPoints(1)
End With
'Page 1
Worksheets("Amorteringsberäkning").Range("ActiveRangeSheet1").CopyPicture Appearance:=xlScreen, Format:=xlPicture
wordapp.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine, DisplayAsIcon:=False
wordapp.ActiveDocument.InlineShapes(1).Height = CentimetersToPoints(34)
wordapp.ActiveDocument.InlineShapes(1).Width = CentimetersToPoints(20)
End Sub
但我收到错误"远程服务器机器不存在或不可用。"有线索吗?