Hi everyone
I have a database where I pull info from it to merge into a word document. Everything was going brilliant. Nothing new has been changed until all of a sudden I get an error code. Error 4248!!!!!
Code:
On Error GoTo MergeButton_Err
Dim objWord As Word.Application
'Start Microsoft Word 97.
Set objWord = CreateObject("Word.Application")
With objWord
'Make the application visible.
.Visible = True
'Open the document.
.Documents.Open ("\\Dashboard System Files\files\quote1.doc")
'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("our_ref").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Ref_Number))
.ActiveDocument.Bookmarks("name").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Name))
.ActiveDocument.Bookmarks("company").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Company))
.ActiveDocument.Bookmarks("project").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Project))
.ActiveDocument.Bookmarks("our_ref_2").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Ref_Number))
.ActiveDocument.Bookmarks("company_2").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Company))
.ActiveDocument.Bookmarks("project_2").Select
.Selection.Text = (CStr(Forms!Tender_List_Datasheet_Popup!Project))
End With
Exit Sub
Can anyone point me in the right direction?