J
Jeff C
I am cross posting here from the Access Group. I am exporting a report to an
RTF file and opening it in WORD from access with this:
Set wdApp = New Word.Application
wdApp.Visible = True
Set doc = wdApp.Documents.Open("T:\Reports\Report.rtf")
wdApp.Activate
I built a macro that will send the contents of this to the message body of
an email and send via outlook which works manually running the macro, and
works programatically from Access with one exception.
Without the wdApp.Activate the Word document does not have focus so the
macro code cant's find a document. With the wdApp.Activate it appears that
with Access losing focus to Word, the code quits running right after that
line.
How can I either run the Macro with the Word document or the Code on the
Word document?
I would really appreciate the help. Thank you
RTF file and opening it in WORD from access with this:
Set wdApp = New Word.Application
wdApp.Visible = True
Set doc = wdApp.Documents.Open("T:\Reports\Report.rtf")
wdApp.Activate
I built a macro that will send the contents of this to the message body of
an email and send via outlook which works manually running the macro, and
works programatically from Access with one exception.
Without the wdApp.Activate the Word document does not have focus so the
macro code cant's find a document. With the wdApp.Activate it appears that
with Access losing focus to Word, the code quits running right after that
line.
How can I either run the Macro with the Word document or the Code on the
Word document?
I would really appreciate the help. Thank you