R
raphiel2063
Ok. I've got the below code and it seems to work fine all the way up to where
it's going to paste into word (last sub) and it has an error. I want it to
paste the copied cells in to word (as unformatted text). It keeps throwing up
an error runtime error 1004. Any ideas?
Sub CopyCellsFromExcel()
Dim wordApp As Object
Dim fNameAndPath As String
Dim wdPastetext As String
ActiveSheet.Range("I5:I49").Copy
Application.CutCopyMode = False
Sub OpenAWordFile()
fNameAndPath = "C:\Documents and Settings\tom.jordan\My
Documents\Projects\FFEC Headed Paper.doc"
Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open (fNameAndPath)
wordApp.Visible = True
Selection.PasteSpecial DataType:=wdPastetext
End Sub
it's going to paste into word (last sub) and it has an error. I want it to
paste the copied cells in to word (as unformatted text). It keeps throwing up
an error runtime error 1004. Any ideas?
Sub CopyCellsFromExcel()
Dim wordApp As Object
Dim fNameAndPath As String
Dim wdPastetext As String
ActiveSheet.Range("I5:I49").Copy
Application.CutCopyMode = False
Sub OpenAWordFile()
fNameAndPath = "C:\Documents and Settings\tom.jordan\My
Documents\Projects\FFEC Headed Paper.doc"
Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open (fNameAndPath)
wordApp.Visible = True
Selection.PasteSpecial DataType:=wdPastetext
End Sub