pmle
asked on
Export Access Report into Word (without losing the formatting!)
I am trying to export an Access reoport (100+ pages). I keep losing my formatting, and Word just decides to do all kinds of crazy things with my data, such as different spacing in different areas, and duplicating data. The only reason that I even want to export to Word is to create a Table of Contents, and an index. Is there any way to either fix the formatting issue in Word, or create a TOC and index on an Access report? Thanks a bunch!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Could you post the code for opening up a snapshot as an object in word. I've tried the following code that outputs a report selected from a listbox as a snapshot object, inserts it to a word document and attaches the document to an outlook email...and snpshot won't format at all. The only thing that has come reasonably close to preserving the format has been when I export in rtf format. My code using snapshot is excerpted below:
'output value of bound column for selected list item to word
DoCmd.OutputTo acOutputReport, ctlListBox.Column(0, varItem), acFormatSNP, "c:\Temp\" & ctlListBox.ItemData(varIte
AppWord.Selection.InsertFi
If i < ctlListBox.ItemsSelected.C
AppWord.Selection.InsertBr
End If
Next varItem
'create email attachment
Progress = "Generating Email"
EventTitle = ctlListBox.ItemData(varIte
AppWord.ActiveDocument.Sav
AppWord.ActiveDocument.Bui
AppWord.ActiveDocument.Sav