Email reports with graphics (no snapshot or PDF)

  • Thread starter Thread starter JackUzi
  • Start date Start date
J

JackUzi

Guest
Hello All,

I want to email a report with all company logos. But i don't want it to send it as RTF, Snapshot,PDF, HTML. Only in Word format ( ext .DOC). I've searched this forum but nobody can answer the question. Is it truely not possible?
 
Ive researched this quite a bit and have found no way (or patch) around this.

Jim
 
I'm desperately trying to do the same thing, i.e. export a report to Word and retain all the formatting. What version of Access are you using? I'm using 97 and wonder if either 2000 or 2002 will allow users to retain the formatting...

There MUST be a way to do this!
 
Ok, done it!! You can use Visual Basic within Word to write macros that open and query databases in Access for you using SQL statements. By placing bookmarks on the word document you can format the outputted data.
 
I'll post some code for you to look at:

Sub name()
Const cstrDBname As String = "C:\dbname.mdb"
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Dim strProject As String

Set db = OpenDatabase(cstrDBname)

'RUN QUERY
strSQL = "SELECT field.table, field.table FROM table WHERE statement;"
Set rs = db.OpenRecordset(strSQL)
Selection.GoTo What:=wdGoToBookmark, Name:="bookmarkname"
With rs
Do Until .EOF
Selection.TypeText .Fields(0)
Selection.GoTo What:=wdGoToBookmark, Name:="bookmarkname"
Selection.TypeText .Fields(1)
Selection.GoTo What:=wdGoToBookmark, Name:="bookmarkname"
etc..
.MoveNext
Loop
End With

'REPEAT SQL STATEMENTS AS NECESSARY USING APPROPRIATE BOOKMARKS.

End Sub
 

Users who are viewing this thread

Back
Top Bottom