PDA

View Full Version : Send all open word documents



3Cees
04-28-2008, 12:51 AM
Hi guys

For the past three years i've been using the following macro with complete sucess

Sub SendAllEmails()

Dim objDoc As Document

For Each objDoc In Application.Documents
objDoc.SendMail
Next objDoc

Set objDoc = Nothing

End Sub

I sometimes have to send up to 30 words documents as separate e-mails to my boss (am secretary). I have never had a problem and it can take 30 word documents (sometimes more) with aplomb. This macro of course saves me tons of time because instead of sending one document at a time i just run this macro and all i have to do is put her name in the to: filed when the outlook screen comes up...

It stopped working last week.

I dont' think it's word as i have a similar macro for print-all-open-documents which is working fine.

It's gets to the second document, the outlook screen comes up, i type in my bosses name and everything freezes... it wont go onto the third word document. Even though it's frozen on the outlook screen, it does actually send this mail (ie my compute is frozen but my boss receives the mail that everything jammed on).

As i say, am not sure if the problem is with Word or Outlook...

Help please!

Thank you in advance for your time...

lucas
04-28-2008, 07:50 AM
It works fine for me on a few documents. I don't think it is a program, possibly your computer. When you say jammed up do you mean locked up and you have to close using task manager?

3Cees
04-28-2008, 09:53 AM
Yes. Microsoft Word completely freezes and i have to close it through the task manager.

It freezes on the outlook screen, but i can go in and out of outlook... and it does actually send the second mail...

As i say, this has worked for years for me and only last week started to fail.

If anyone has an alternative of how i could send 30 open word documents as 30 separate e-mails i would be very grateful...

Kind regards