Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Until I saw Dougs article €śinserting attachments into mailmerge emails€ť, I
thought there was no way to send an attachment with an email from Outlook 2003. I had been working on emailing a merged email message, with a second page containing what I really wanted to send as an attachment, and, due to formatting problems on my internal test run and the scope for further problems with some of our unsophisticated prospect base, I had just about given up on the whole idea. I have trialled Dougs program with a work-around for the attachment (in my case a .pdf form) and it works well, apart from one problem. I copied and pasted the macro as directed, after specifying the References for the Tools Menu. I am using Outlook 2003 with Word 2003. Although my sent document and the inbox document (sent to myself for the trial) both specify the document as HTML format, the document itself has been stripped of graphics and the bold print and italic print. Everything appears as the original regular Ariel 10 font, similar to this print, with the bullets and tabs, removed. Is there a way to overcome this problem? If there has been a similar query before now, just point me to the comments and I will be very grateful. Alan |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
One thing you could try is to install the demo version of MAPILab's
Mailmerge toolkit add-in for Outlook http://www.mapilab.com/outlook/mail_merge/ While this will allow you to send e-mail attachments directly, it is also rumoured to fix the issues that cause problems with html e-mail merges and they should remain fixed if you decide not to continue with it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Alan wrote: Until I saw Doug's article "inserting attachments into mailmerge emails", I thought there was no way to send an attachment with an email from Outlook 2003. I had been working on emailing a merged email message, with a second page containing what I really wanted to send as an attachment, and, due to formatting problems on my internal test run and the scope for further problems with some of our unsophisticated prospect base, I had just about given up on the whole idea. I have trialled Doug's program with a work-around for the attachment (in my case a .pdf form) and it works well, apart from one problem. I copied and pasted the macro as directed, after specifying the References for the Tools Menu. I am using Outlook 2003 with Word 2003. Although my sent document and the inbox document (sent to myself for the trial) both specify the document as HTML format, the document itself has been stripped of graphics and the bold print and italic print. Everything appears as the original regular Ariel 10 font, similar to this print, with the bullets and tabs, removed. Is there a way to overcome this problem? If there has been a similar query before now, just point me to the comments and I will be very grateful. Alan |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hi Doug
I regret to say I could not get your modification to work. The attachements works perfectly but now the mesage is totally blank except for the subject and my personal signature (not part of the letter to merge). I can see the theory of the change is to copy the main message before it gets changed, then paste it back after the conflict but i have no idea about the language to use or the cause of the conflict. In desperation I followed Graham's suggestion and now have a temporary working solution. I really appreciate your help and the speed of your response. "Doug Robbins - Word MVP" wrote: The following modified macro will preserve the graphics and formatting in the messages: Sub emailmergewithattachments() 'To create the email messages in Dim Source As Document, Maillist As Document, TempDoc As Document Dim DataRange As Range Dim i As Long, j As Long Dim bStarted As Boolean Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem Dim mysubject As String, message As String, Title As String Set Source = ActiveDocument ' Check if Outlook is running. If it is not, start Outlook On Error Resume Next Set oOutlookApp = GetObject(, "Outlook.Application") 'oOutlookApp.DefaultProfileName If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") bStarted = True End If ' Open the catalog mailmerge document With Dialogs(wdDialogFileOpen) .Show End With Set Maillist = ActiveDocument ' Show an input box asking the user for the subject to be inserted into the email messages message = "Enter the subject to be used for each email message." ' Set prompt. Title = " Email Subject Input" ' Set title. ' Display message, title mysubject = InputBox(message, Title) ' Iterate through the Sections of the Source document and the rows of the catalog mailmerge document, ' extracting the information to be included in each email. For j = 1 To Source.Sections.Count - 1 Source.Sections(j).Range.Copy Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .Subject = mysubject .BodyFormat = olFormatHTML .Display Set objDoc = .GetInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.Paste Set DataRange = Maillist.Tables(1).Cell(j, 1).Range DataRange.End = DataRange.End - 1 .To = DataRange ' .cc = ; " For i = 2 To Maillist.Tables(1).Columns.Count Set DataRange = Maillist.Tables(1).Cell(j, i).Range DataRange.End = DataRange.End - 1 .Attachments.Add Trim(DataRange.Text), olByValue, 1 Next i .Send End With Set oItem = Nothing Next j Maillist.Close wdDoNotSaveChanges ' Close Outlook if it was started by this macro. If bStarted Then oOutlookApp.Quit End If MsgBox Source.Sections.Count - 1 & " messages have been sent." 'Clean up Set oOutlookApp = Nothing End Sub -- 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, originally posted via msnews.microsoft.com "Alan" wrote in message ... Until I saw Dougs article €śinserting attachments into mailmerge emails€ť, I thought there was no way to send an attachment with an email from Outlook 2003. I had been working on emailing a merged email message, with a second page containing what I really wanted to send as an attachment, and, due to formatting problems on my internal test run and the scope for further problems with some of our unsophisticated prospect base, I had just about given up on the whole idea. I have trialled Dougs program with a work-around for the attachment (in my case a .pdf form) and it works well, apart from one problem. I copied and pasted the macro as directed, after specifying the References for the Tools Menu. I am using Outlook 2003 with Word 2003. Although my sent document and the inbox document (sent to myself for the trial) both specify the document as HTML format, the document itself has been stripped of graphics and the bold print and italic print. Everything appears as the original regular Ariel 10 font, similar to this print, with the bullets and tabs, removed. Is there a way to overcome this problem? If there has been a similar query before now, just point me to the comments and I will be very grateful. Alan |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hi Graham
Your quick response made me try a third party remedy against my usual inclinations. I have got it working with the trial version and think i will be buying the official version for US$24. I recommend that anybody else trying it follows the video demo first as it is quite informative. I was amazed at how little effort the add-on needs before it is in full working order. Thanks again to both you and Doug. In return, I would like to pass on a tip I discovered in working up to this stage of mail merging. When you first save a file in Word, the program suggests a name for your file. The suggested name is the first word in text on your page (excluding any graphics). When you receive a merged email message and print it, the suggested, not amended, file name will appear at the top left corner of the printed page. This means that your carefully-composed message starts with garbage. If you remember, you can use this to appear more efficient by inserting the name of your company or product at the top of your draft before first saving it. Then that name will appear at the top of the prited message. You will probably want to delete it from the draft on a second save but the original words will remain embedded in subsequent versions. This may only apply with Office 2003 €“ I have no other edition to check. Good luck, Alan "Graham Mayor" wrote: One thing you could try is to install the demo version of MAPILab's Mailmerge toolkit add-in for Outlook http://www.mapilab.com/outlook/mail_merge/ While this will allow you to send e-mail attachments directly, it is also rumoured to fix the issues that cause problems with html e-mail merges and they should remain fixed if you decide not to continue with it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Alan wrote: Until I saw Doug's article "inserting attachments into mailmerge emails", I thought there was no way to send an attachment with an email from Outlook 2003. I had been working on emailing a merged email message, with a second page containing what I really wanted to send as an attachment, and, due to formatting problems on my internal test run and the scope for further problems with some of our unsophisticated prospect base, I had just about given up on the whole idea. I have trialled Doug's program with a work-around for the attachment (in my case a .pdf form) and it works well, apart from one problem. I copied and pasted the macro as directed, after specifying the References for the Tools Menu. I am using Outlook 2003 with Word 2003. Although my sent document and the inbox document (sent to myself for the trial) both specify the document as HTML format, the document itself has been stripped of graphics and the bold print and italic print. Everything appears as the original regular Ariel 10 font, similar to this print, with the bullets and tabs, removed. Is there a way to overcome this problem? If there has been a similar query before now, just point me to the comments and I will be very grateful. Alan |
#6
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
What is being copied and pasted into the mail message is the formatted
letter/document created by the mail merge process for that recipient. It sounds like you might have missed the step of the instructions to execute that merge to a new document and with that document as the active document, run the macro. -- 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, originally posted via msnews.microsoft.com "Alan" wrote in message ... Hi Doug I regret to say I could not get your modification to work. The attachements works perfectly but now the mesage is totally blank except for the subject and my personal signature (not part of the letter to merge). I can see the theory of the change is to copy the main message before it gets changed, then paste it back after the conflict but i have no idea about the language to use or the cause of the conflict. In desperation I followed Graham's suggestion and now have a temporary working solution. I really appreciate your help and the speed of your response. "Doug Robbins - Word MVP" wrote: The following modified macro will preserve the graphics and formatting in the messages: Sub emailmergewithattachments() 'To create the email messages in Dim Source As Document, Maillist As Document, TempDoc As Document Dim DataRange As Range Dim i As Long, j As Long Dim bStarted As Boolean Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem Dim mysubject As String, message As String, Title As String Set Source = ActiveDocument ' Check if Outlook is running. If it is not, start Outlook On Error Resume Next Set oOutlookApp = GetObject(, "Outlook.Application") 'oOutlookApp.DefaultProfileName If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") bStarted = True End If ' Open the catalog mailmerge document With Dialogs(wdDialogFileOpen) .Show End With Set Maillist = ActiveDocument ' Show an input box asking the user for the subject to be inserted into the email messages message = "Enter the subject to be used for each email message." ' Set prompt. Title = " Email Subject Input" ' Set title. ' Display message, title mysubject = InputBox(message, Title) ' Iterate through the Sections of the Source document and the rows of the catalog mailmerge document, ' extracting the information to be included in each email. For j = 1 To Source.Sections.Count - 1 Source.Sections(j).Range.Copy Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .Subject = mysubject .BodyFormat = olFormatHTML .Display Set objDoc = .GetInspector.WordEditor Set objSel = objDoc.Windows(1).Selection objSel.Paste Set DataRange = Maillist.Tables(1).Cell(j, 1).Range DataRange.End = DataRange.End - 1 .To = DataRange ' .cc = ; " For i = 2 To Maillist.Tables(1).Columns.Count Set DataRange = Maillist.Tables(1).Cell(j, i).Range DataRange.End = DataRange.End - 1 .Attachments.Add Trim(DataRange.Text), olByValue, 1 Next i .Send End With Set oItem = Nothing Next j Maillist.Close wdDoNotSaveChanges ' Close Outlook if it was started by this macro. If bStarted Then oOutlookApp.Quit End If MsgBox Source.Sections.Count - 1 & " messages have been sent." 'Clean up Set oOutlookApp = Nothing End Sub -- 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, originally posted via msnews.microsoft.com "Alan" wrote in message ... Until I saw Dougs article €śinserting attachments into mailmerge emails€ť, I thought there was no way to send an attachment with an email from Outlook 2003. I had been working on emailing a merged email message, with a second page containing what I really wanted to send as an attachment, and, due to formatting problems on my internal test run and the scope for further problems with some of our unsophisticated prospect base, I had just about given up on the whole idea. I have trialled Dougs program with a work-around for the attachment (in my case a .pdf form) and it works well, apart from one problem. I copied and pasted the macro as directed, after specifying the References for the Tools Menu. I am using Outlook 2003 with Word 2003. Although my sent document and the inbox document (sent to myself for the trial) both specify the document as HTML format, the document itself has been stripped of graphics and the bold print and italic print. Everything appears as the original regular Ariel 10 font, similar to this print, with the bullets and tabs, removed. Is there a way to overcome this problem? If there has been a similar query before now, just point me to the comments and I will be very grateful. Alan |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can not open Word attachments from emails | Microsoft Word Help | |||
inserting attachments into mailmerge emails | Mailmerge | |||
word attachments in emails | Microsoft Word Help | |||
Attachments to emails in Word 2003 mailmerge without VBA | New Users | |||
How do I add attachments to merged emails in Word? | Mailmerge |