Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Help With Emailing Attachments

Geek News

Help With Emailing Attachments
Paul Ette 11/21/2008 4:03:03 PM
Hi all,

I have been trying to set up a mailmerge with attachments using Doug's macro
with some degree of success.

When I run the macro the emails with attachments are created and sent
however I seem to get one extra blank email being produced to the last person
in the catalog.

Any ideas would be gratefully accepted and tried.

Regards

Paul
Re: Help With Emailing Attachments
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 11/22/2008 11:12:59 PM
I recently modified the code in that article to try and overcome an issue
that a lot of people were having when they did not follow the instructions
correctly and it seems like the following line of code

For j = 1 To Source.Sections.Count

needs to be modified to

For j = 1 To Source.Sections.Count - 1

Try that and let me know how you get on.


--
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

"Paul Ette" <Paul Ette[ at ]discussions.microsoft.com> wrote in message
news:43940FFC-727C-4921-80B3-AEBD54ADF915[ at ]microsoft.com...
[Quoted Text]
> Hi all,
>
> I have been trying to set up a mailmerge with attachments using Doug's
> macro
> with some degree of success.
>
> When I run the macro the emails with attachments are created and sent
> however I seem to get one extra blank email being produced to the last
> person
> in the catalog.
>
> Any ideas would be gratefully accepted and tried.
>
> Regards
>
> Paul


Re: Help With Emailing Attachments
Paul Ette 11/24/2008 10:01:01 AM
Hi Doug,

I have tried your suggestion and that did the trick, thank you.

The message box was also giving the incorrect count so I have also updated
the message box code to:
MsgBox Source.Sections.Count - 1

Just for my peace of mind do you have any idea why this has been a problem?
Particularly as the rest of the process is working as expected.

Many thanks.

Paul
"Doug Robbins - Word MVP" wrote:

[Quoted Text]
> I recently modified the code in that article to try and overcome an issue
> that a lot of people were having when they did not follow the instructions
> correctly and it seems like the following line of code
>
> For j = 1 To Source.Sections.Count
>
> needs to be modified to
>
> For j = 1 To Source.Sections.Count - 1
>
> Try that and let me know how you get on.
>
>
> --
> 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
>
> "Paul Ette" <Paul Ette[ at ]discussions.microsoft.com> wrote in message
> news:43940FFC-727C-4921-80B3-AEBD54ADF915[ at ]microsoft.com...
> > Hi all,
> >
> > I have been trying to set up a mailmerge with attachments using Doug's
> > macro
> > with some degree of success.
> >
> > When I run the macro the emails with attachments are created and sent
> > however I seem to get one extra blank email being produced to the last
> > person
> > in the catalog.
> >
> > Any ideas would be gratefully accepted and tried.
> >
> > Regards
> >
> > Paul
>
>
>
Re: Help With Emailing Attachments
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 11/24/2008 7:34:00 PM
Hi Paul,

There is an error in the article that I recently updated so that it iterates
through the Sections of the document created by executing the Letter merge
rather than through the rows of the table in the Directory type mail merge
that has to be created as part of the process.

I made that change because many people were not executing the letter merge,
but running the macro with the letter merge main document as the active
document, which would then only have one section and as a result, they were
sending our email messages with no text in the body.

In making the modification, I overlooked that when the letter merge is
executed to a new document, there is a continuous section break at the end
of the document.

I will have to get the article on the website updated.

Thanks for bringing the problem to my attention.

--
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

"Paul Ette" <PaulEtte[ at ]discussions.microsoft.com> wrote in message
news:E677F7C4-BD2B-4337-871B-59B747E54EAC[ at ]microsoft.com...
[Quoted Text]
> Hi Doug,
>
> I have tried your suggestion and that did the trick, thank you.
>
> The message box was also giving the incorrect count so I have also updated
> the message box code to:
> MsgBox Source.Sections.Count - 1
>
> Just for my peace of mind do you have any idea why this has been a
> problem?
> Particularly as the rest of the process is working as expected.
>
> Many thanks.
>
> Paul
> "Doug Robbins - Word MVP" wrote:
>
>> I recently modified the code in that article to try and overcome an issue
>> that a lot of people were having when they did not follow the
>> instructions
>> correctly and it seems like the following line of code
>>
>> For j = 1 To Source.Sections.Count
>>
>> needs to be modified to
>>
>> For j = 1 To Source.Sections.Count - 1
>>
>> Try that and let me know how you get on.
>>
>>
>> --
>> 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
>>
>> "Paul Ette" <Paul Ette[ at ]discussions.microsoft.com> wrote in message
>> news:43940FFC-727C-4921-80B3-AEBD54ADF915[ at ]microsoft.com...
>> > Hi all,
>> >
>> > I have been trying to set up a mailmerge with attachments using Doug's
>> > macro
>> > with some degree of success.
>> >
>> > When I run the macro the emails with attachments are created and sent
>> > however I seem to get one extra blank email being produced to the last
>> > person
>> > in the catalog.
>> >
>> > Any ideas would be gratefully accepted and tried.
>> >
>> > Regards
>> >
>> > Paul
>>
>>
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net