Hi all
I have a word document that is populated by Access forms using the below code, in the Access form we have a REF number that is inputted into a Text box named TXTREFNumber is it possible to create a CODE-128 barcode from this and then displayed within the word document as a barcode on the word bookmark HRRefBarcode?
I have a word document that is populated by Access forms using the below code, in the Access form we have a REF number that is inputted into a Text box named TXTREFNumber is it possible to create a CODE-128 barcode from this and then displayed within the word document as a barcode on the word bookmark HRRefBarcode?
Code:
FUNC_CreateReportDownload
'FIND WORD FILE
Dim oWd As Object 'Word.Application
Dim oDoc As Object 'Word.Document
Dim bm As Object 'Word.Bookmark
Set oWd = CreateObject("Word.Application")
Set oDoc = oWd.Documents.Add(CurrentProject.Path & "\TemplateFiles\HRReportTemplate.docx")
'HR RefNumber Barcode
Set bm = oDoc.Bookmarks("HRRefBarcode")
bm.Range.Text = [Forms]![FRM_FullCaseDetails].[Form]![TXTREFNumber]
oWd.Visible = True
'Personal Details
Set bm = oDoc.Bookmarks("PERSONALDETAILS")
bm.Range.Text = [Forms]![FRM_FullCaseDetails].[Form]![StaffNumber]
oWd.Visible = True
End Function