jazminecat23
Programmer
Hi all - has anyone had success creating a report with the line numbering down the side that legal documents require? I'm working on a system for a law office that needs this.
Thanks.
Thanks.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Report_Page()
Dim intVertSpacing As Integer
Dim intNum As Integer
intVertSpacing = 1440 / 4 '1/4 inch
For intNum = 1 To 36
Me.CurrentY = intNum * intVertSpacing
Me.CurrentX = 0 'left margin
Me.Print intNum
Next
End Sub
Dim dbs As Database
Dim objWord As Object
Dim PrintResponse
Set dbs = CurrentDb
'create reference to Word Object
Set objWord = CreateObject("Word.Application")
'Word Object is created - assign bookmarks with data.
With objWord
.Visible = True
.Documents.Open (set path and document details here "\WordDocs\mydocument.doc")
'move to each bookmark, and insert correct text.
.ActiveDocument.Bookmarks("Client").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![PolInsured]))
.ActiveDocument.Bookmarks("Broker").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![BrName]))
.ActiveDocument.Bookmarks("subject").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![subject]))
.ActiveDocument.Bookmarks("Policy1").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![PolPolicyno]))
.ActiveDocument.Bookmarks("CoverFrom").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![PolCoverFrom]))
.ActiveDocument.Bookmarks("Contact").Select
.Selection.Text = (CStr(Forms!frmportfolioentry![BrName]))
End With
'Print the document
objWord.ActiveDocument.PrintOut Background:=False
'release all objects
With objWord
.Visible = False
.Quit False
End With
Set objWord = Nothing
Set dbs = Nothing