Novice1975
Technical User
Hello
This is driving me nuts. Please help. I am trying to paste a range from an Excel sheet into a word document, but it keeps crashing when the paste should happen. Here is the relevant code:
"Dim wrd As Word.Application
Dim myDoc As Word.Document
Dim myExcelDoc As Excel.Workbook
Set myExcelDoc = ActiveWorkbook
myExcelDoc.Activate
wksPostcodeCalcs.Activate
ActiveSheet.Range("tblSocioGroupsDefs").Select
Selection.Copy
Set wrd = CreateObject("Word.Application")
wrd.Visible = True
Set myDoc = wrd.Documents.Open(strLetterPath)
myDoc.Activate
ActiveDocument.Range.Bookmarks("tblSocioGroupsDefs").Range.PasteSpecial Link:=False, DataType:=9 'wdPasteEnhancedMetafile"
The error says "the requested member of the selection does not exist".
Please help.
Thanks
This is driving me nuts. Please help. I am trying to paste a range from an Excel sheet into a word document, but it keeps crashing when the paste should happen. Here is the relevant code:
"Dim wrd As Word.Application
Dim myDoc As Word.Document
Dim myExcelDoc As Excel.Workbook
Set myExcelDoc = ActiveWorkbook
myExcelDoc.Activate
wksPostcodeCalcs.Activate
ActiveSheet.Range("tblSocioGroupsDefs").Select
Selection.Copy
Set wrd = CreateObject("Word.Application")
wrd.Visible = True
Set myDoc = wrd.Documents.Open(strLetterPath)
myDoc.Activate
ActiveDocument.Range.Bookmarks("tblSocioGroupsDefs").Range.PasteSpecial Link:=False, DataType:=9 'wdPasteEnhancedMetafile"
The error says "the requested member of the selection does not exist".
Please help.
Thanks