I'm not sure where to post this question exactly, so I decided it's end result would be an Excel format
I have the following code of which I am stuck... I have reached the point where I have exported an Access Report to Word doc and now I would like to copy the contents of this Word doc...thus selection.wholestory and paste this into a new Excel workbook.... I cannot just export the Access Report to Excel because the format does not result in the same layout...
My main question/problem is how can I use selection.wholestory for the Word document and initialize a new Excel workbook and paste this clipboard contents into the new wb?
Any advice or help would be amazing!
Thanks in advance,
I have the following code of which I am stuck... I have reached the point where I have exported an Access Report to Word doc and now I would like to copy the contents of this Word doc...thus selection.wholestory and paste this into a new Excel workbook.... I cannot just export the Access Report to Excel because the format does not result in the same layout...
My main question/problem is how can I use selection.wholestory for the Word document and initialize a new Excel workbook and paste this clipboard contents into the new wb?
Code:
Private Sub SummaryByRangeOK_Click()
On Error GoTo Err_SummaryByRangeOK_Click
Dim stDocName As String
Dim sName As String
Dim eName As String
Dim myWB As Excel.Workbook
stDocName = "Report By Range for Excel"
DoCmd.OpenReport stDocName, acPreview
sName = stDocName + ".doc"
DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF, sName, True
Selection.WholeStory
Selection.Copy
eName = stDocName + ".xls"
Set myWB = eName
Any advice or help would be amazing!
Thanks in advance,