I'm using the directions from Doug Robbins "Mail Merge to E-mail with
Attachments" article. I've done the prep, created the directory merge with
email addresses and document names. I've created the letter merge to a new
document and run the macro. Every thing seems to work correctly at the
start--I get the "Enter the subject..." and the rest of the preliminary
stuff. Then it starts to do it's work and I answer Yes to "A program is
trying to automatically send e-mail..." for the 3 addresses in my sample
list. But at this point it seems to hang and I continue getting this
Information box for Document 4, Document 5, Document 6, etc. until I
Ctrl-Break to stop the process. When I look at the macro contents it points
to this section:
End With
Set oItem = Nothing
ActiveDocument.Close wdDoNotSaveChanges
Counter = Counter + 1
Wend
Any ideas about what my problem is and how I can correct it? I'm so close
and yet so far away.
Thanks,
Lyndie
Doug Robbins - Word MVP - 21 Feb 2008 21:39 GMT
Have you activated the Express Click Yes utility?
What you see in the Visual Basic Editor after pressing Ctrl-Break, doesn't
really mean anything is wrong with that section of the code.
In the letter that you are trying to email with the attachments, how many
Sections are there?

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> I'm using the directions from Doug Robbins "Mail Merge to E-mail with
> Attachments" article. I've done the prep, created the directory merge
[quoted text clipped - 19 lines]
> Thanks,
> Lyndie
LyndieBee - 21 Feb 2008 21:51 GMT
For my test file, it is a one-liner attachment with only one section. Do I
need section break at the end of the text?
> Have you activated the Express Click Yes utility?
>
[quoted text clipped - 27 lines]
> > Thanks,
> > Lyndie
LyndieBee - 21 Feb 2008 22:01 GMT
In answer to your Express ClickYess utility, yes I have downloaded it and it
works fine. Thanks!
> For my test file, it is a one-liner attachment with only one section. Do I
> need section break at the end of the text?
[quoted text clipped - 30 lines]
> > > Thanks,
> > > Lyndie
Doug Robbins - Word MVP - 21 Feb 2008 22:21 GMT
It was not the attachment about which I was asking the number of Sections.
It was the mail merge document that is going to be emailed and to which the
other document/file is going to be attached. That is the document that is
created by executing the merge to a new document and which is to be the
Active Document when the macro is run.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> For my test file, it is a one-liner attachment with only one section. Do
> I
[quoted text clipped - 35 lines]
>> > Thanks,
>> > Lyndie
LyndieBee - 21 Feb 2008 22:18 GMT
I believe I misunderstood your question. There are 5 section. A Next Page
Section Break after each of the letters, and a Continuous Section Break at
the end of the document.
> Have you activated the Express Click Yes utility?
>
[quoted text clipped - 27 lines]
> > Thanks,
> > Lyndie
Doug Robbins - Word MVP - 21 Feb 2008 22:49 GMT
It sounds like you did not use the same datasource to create that document
as you used to create the directory document in which then filenames of the
attachments appear, or at least did not merge the same number of records
each time.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I believe I misunderstood your question. There are 5 section. A Next Page
> Section Break after each of the letters, and a Continuous Section Break at
[quoted text clipped - 35 lines]
>> > Thanks,
>> > Lyndie
Joris - 25 Apr 2008 14:42 GMT
Hi,
I tried to do the same (using the emailmergewithattachments macro) and
didn't get really far. Visual basic points to the 'Dim oOutlookApp As
Outlook.Application' line.
I merged a word table with an excel db. That word table contains in the
first column the emails, in the second the attachment name and location. I
tried with the first row as the headings or not.
I then merged my excel db with a word template letter. ANd upon running the
macro, it doesn't work, opening visual basic as previously said.
Any help much appreciated.
Thanks
> I'm using the directions from Doug Robbins "Mail Merge to E-mail with
> Attachments" article. I've done the prep, created the directory merge with
[quoted text clipped - 16 lines]
> Thanks,
> Lyndie
Graham Mayor - 25 Apr 2008 15:19 GMT
> Hi,
> I tried to do the same (using the emailmergewithattachments macro) and
> didn't get really far. Visual basic points to the 'Dim oOutlookApp As
> Outlook.Application' line.
From the vba editor Tools > References - check the Microsoft Outlook option.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Allan S. Warrior - 25 Apr 2008 16:37 GMT
I'm also having trouble with the same variable declaration. I do have the
Outlook Reference checked, but it still fails to recognize the type.
Outlook 2003, Word 2003, Windows XP.

Signature
Allan S. Warrior
Microsoft Office Specialist Master Instructor
> > Hi,
> > I tried to do the same (using the emailmergewithattachments macro) and
> > didn't get really far. Visual basic points to the 'Dim oOutlookApp As
> > Outlook.Application' line.
> >
> From the vba editor Tools > References - check the Microsoft Outlook option.
Doug Robbins - Word MVP - 25 Apr 2008 21:07 GMT
The reference is to the "Microsoft Outlook 11.0 Object Library"?
Are you able to use Outlook to send a document by selecting Send from the
File menu in Word?

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> I'm also having trouble with the same variable declaration. I do have the
> Outlook Reference checked, but it still fails to recognize the type.
[quoted text clipped - 8 lines]
>> From the vba editor Tools > References - check the Microsoft Outlook
>> option.
Allan S. Warrior - 26 Apr 2008 00:28 GMT
Sorry, I was being an idiot. Or at least demonstrating very poor attention to
detail. I clicked the reference, but missed the checkbox. When I went back
in to check once again, I discovered my error. Once corrected it worked
great. I blame Friday-mind.

Signature
Allan S. Warrior
Microsoft Office Specialist Master Instructor
> The reference is to the "Microsoft Outlook 11.0 Object Library"?
>
[quoted text clipped - 13 lines]
> >> From the vba editor Tools > References - check the Microsoft Outlook
> >> option.