Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access97 to access2003 conversion

Status
Not open for further replies.

rlf1957

IS-IT--Management
Mar 7, 2003
60
US
I have created a form that executes the following code to open Word and merge data into a form letter. It works great in Access/Word 97 but with Access/Word 2003 the mail merge toolbar is not being highlighted to allow me to merge data. The documents works fine if I call it up thru Word but not when I activate it thru the form I created.
Any thoughts ?? Probably something simple that I'm overlooking.

Thanks, RLF

Private Sub Print_Cover_Sheets_Click()
On Error GoTo Err_Print_Cover_Sheets_Click

Dim doc As Word.Document, wrdApp As Word.Application
On Error Resume Next
Set wrdApp = GetObject(, "word.application")
If Err.Number <> 0 Then
Set wrdApp = CreateObject("word.application")
End If
wrdApp.Visible = True

Set doc = wrdApp.Documents.Open("C:\my documents\scottk\documents\askcov.doc")

Exit_Print_Cover_Sheets_Click:
Exit Sub

Err_Print_Cover_Sheets_Click:
MsgBox Err.Description
Resume Exit_Print_Cover_Sheets_Click

End Sub
 
You may try to tick the "Confirm conversions on open" check box in the General tab of the Options form in Word.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PH,

No luck - I chk'd that option but when I open the main document using my "Print Document" form, I am still requiured to click the "Open Data Source" icon on the mail merge tool bar (second button from left) and reselecting the data source every time. The rest of that toolbar is not accessible.

rlf
 
This behaviour is by design. See Microsoft KB 825765

The easiest way around it is to turn on the display alerts, by including:


wrdApp.displayAlert=wdAlertsAll

before you open the document. The user is then prompted to link to the data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top