Start word from access

Cereldine

Registered User.
Local time
Today, 13:38
Joined
Aug 4, 2005
Messages
71
How do you start word 2000 from access 2000

In a code example im using it simply states

Start microsoft word.

This brings up the (expected end of statement error")
 
what do you want to do with word? if you just want it open then shell or Hyperlink are fine. If you want to work with it in code then you will need to use automation

peter
 
Ive got what i want to work in some fashion,im trying to build up a letter in word using bookmarks that have field values passed to them.

The values from the main form are being passed but the procedure is ignoring values from subform? code is below any ideas? (the sub form is called sub_quotations_form)

On Error GoTo grantoffer_err
'Start Microsoft Word
Dim objWord As Word.Application

Set objWord = CreateObject("Word.Application")
With objWord
' make word visible
.Visible = True

''open document hard coded path may have to be changed
.Documents.Open ("F:\HOME\cerida\DatabaseReports\GrantApplication.doc")

''move through each bookmark in form
.ActiveDocument.Bookmarks("Name").Select
.Selection.Text = (CStr(Forms!applications_staged_development!FullName))
.ActiveDocument.Bookmarks("Respondent").Select
.Selection.Text = (CStr(Forms!applications_staged_development!FullName))
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = (CStr(Forms!applications_staged_development!address))
.ActiveDocument.Bookmarks("ApplicationRef").Select
.Selection.Text = (CStr(Forms!applications_staged_development!application_ref))
.ActiveDocument.Bookmarks("CutOffDate").Select
.Selection.Text = (CStr(Forms!applications_staged_development!cut_off_date))
.ActiveDocument.Bookmarks("QuotationDescription").Select
.Selection.Text = (CStr(Forms![applications_staged_development]![sub_quotations_form].quotation_desc))
.ActiveDocument.Bookmarks("CompanyName").Select
.Selection.Text = (CStr(Forms![applications_staged_development]![sub_quotations_form].company_id))
.ActiveDocument.Bookmarks("QuotationAmount").Select
.Selection.Text = (CStr(Forms![applications_staged_development]![sub_quotations_form].quotation_amt))

End With

'' code to auto print can go in here


DoCmd.SetWarnings False
query = "UPDATE temp_applications_table SET acceptence_letter_sent = now() WHERE applications_id = " & Me.applications_id
DoCmd.RunSQL query
DoCmd.SetWarnings True
Exit Sub
grantoffer_err:

End Sub
 
I would like to use this bookmark code below, but instead of using the form fields use the result from a query...how would I do this?

''move through each bookmark in form
.ActiveDocument.Bookmarks("Name").Select
.Selection.Text = (CStr(Forms!applications_staged_development!FullNa me))
.ActiveDocument.Bookmarks("Respondent").Select
.Selection.Text = (CStr(Forms!applications_staged_development!FullNa me))
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = (CStr(Forms!applications_staged_development!addres s))

Thanks in advance
________
ESSENTIAL VAAAPP VAPORIZER
 
Last edited:

Users who are viewing this thread

Back
Top Bottom