Combinar Correspondencia Acces - Word 2003

zfeliu
10 de Febrero del 2005
Al migrar a Access 2003, tengo problemas al combinar correspondencia con Word des de código vb de Access, este código siempre a funcionado con Access 97 i 2000:

On Error GoTo Err_Ir_a_word_Click
Dim c_doc_save As Variant
Dim c_doc As Word.Document
Dim doc As Variant
Dim appWD As New Word.Application
Dim dbs As Database

Set dbs = CurrentDb

Err.Number = 0
On Error GoTo notloaded
Set appWD = GetObject("Word.Application")

Dim cc_plantilla As Variant

notloaded:
If Err.Number = 429 Then
Set appWD = CreateObject("Word.Application")
TheError = Err.Number
End If

doc = Me.documento
If IsNull(doc) Or doc = "" Then
cc_plantilla = Me.c_plantilla

If IsNull(cc_plantilla) Or cc_plantilla = "" Then
appWD.Documents.Add
Else
If Dir(cc_plantilla) = "" Then
MsgBox "La Plantilla " & cc_plantilla & " de Word, no existe en la ruta especificada", vbExclamation
Exit Sub
End If
appWD.Documents.Add cc_plantilla
End If
doc = appWD.ActiveDocument
appWD.Documents(doc).MailMerge.MainDocumentType =
wdFormLetters
appWD.Documents(doc).MailMerge.OpenDataSource Name:=dbs.Name, _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="TABLE Correo_imp_word"

appWD.Documents(doc).MailMerge.ViewMailMergeFieldCodes = False
appWD.Application.Visible = True
appWD.WindowState = wdWindowStateMaximize
appWD.Documents.Save
c_doc_save = appWD.ActiveDocument.Name
If Not IsNull(c_doc_save) And appWD.ActiveDocument.Saved Then
Me.documento = appWD.ActiveDocument.Path & "" & c_doc_save
End If

Exit Sub

Con Office 2003 no hay manera de hacerlo funcionar.
Alguien sabe que puede estar pasando.

Gracias de antemano.