Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #31  
Old 06-30-2014, 01:42 AM
macropod's Avatar
macropod macropod is online now Mail Merging - Mergeseq + Send Via Email Merge Windows 7 32bit Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I don't need you to provide the macro code - I need the documents. You can attach them by putting them into a zip archive first, then attaching that.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #32  
Old 06-30-2014, 03:33 AM
toughiv toughiv is offline Mail Merging - Mergeseq + Send Via Email Merge Windows Vista Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Novice
Mail Merging - Mergeseq + Send Via Email Merge
 
Join Date: Jun 2014
Posts: 21
toughiv is on a distinguished road
Default

It's working again, it turns out trying to format the <<Data>> field into 4 column layout, then messes with it somehow - resulting in only the top row.

Odd.

I guess im stuck with some text appearing like this:

Date Inv ReferenceInvoice Detail Invoice Amount
Reply With Quote
  #33  
Old 06-30-2014, 03:57 AM
toughiv toughiv is offline Mail Merging - Mergeseq + Send Via Email Merge Windows Vista Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Novice
Mail Merging - Mergeseq + Send Via Email Merge
 
Join Date: Jun 2014
Posts: 21
toughiv is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I don't need you to provide the macro code - I need the documents. You can attach them by putting them into a zip archive first, then attaching that.
It has stopped working again :Z

*Crying*
Attached Files
File Type: zip Macropod.zip (40.5 KB, 12 views)
Reply With Quote
  #34  
Old 06-30-2014, 08:30 AM
toughiv toughiv is offline Mail Merging - Mergeseq + Send Via Email Merge Windows Vista Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Novice
Mail Merging - Mergeseq + Send Via Email Merge
 
Join Date: Jun 2014
Posts: 21
toughiv is on a distinguished road
Default

I had it working - and now it's stopped again?!

Im definitely doing something, but cannot for the life of me figure out what!

I have even looked at the DataSouce and it looks like this (see attached).

It is correct, the tables are merged, I receive the email.

But I only receive the first line of the table?
Attached Images
File Type: jpg formacro.jpg (127.4 KB, 33 views)
Reply With Quote
  #35  
Old 06-30-2014, 05:18 PM
macropod's Avatar
macropod macropod is online now Mail Merging - Mergeseq + Send Via Email Merge Windows 7 32bit Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See attached.

I've made a few minor changes to the last part of the macro code so your indenting of the data will be respected, but that's about all on the macro side of things. I've also applied some tab-stops to your 'Email Merge Main Document' to manage the alignments and reformatted the Invoice Amount field to put the £ symbol into the field and apply a thousands separator. That said, you have no control over whether your recipients will view the emails with quite the same layout as you send them. I also had to clear out some empty rows from your workbook.

Also, the code presently sends the output to a new document (for testing), but I'm sure by now you know how to change that.
Attached Files
File Type: zip Mailmerge.zip (61.4 KB, 26 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #36  
Old 10-13-2014, 04:21 AM
toughiv toughiv is offline Mail Merging - Mergeseq + Send Via Email Merge Windows Vista Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Novice
Mail Merging - Mergeseq + Send Via Email Merge
 
Join Date: Jun 2014
Posts: 21
toughiv is on a distinguished road
Default Advancing the multiple rows, to multiple recipients

Hi Marco,

Long time!

I was hoping for your wizardry/ sagely advice once more...

I am now trying to use the catalog mail merge > merging the tables> Then sending the tables to multiple recipients...i.e. To & CC.

I have done a little looking around and this is what I have found so far:
Code:
With oItem 
    .Subject = mysubject 
    .body = ActiveDocument.Content 
    Set Datarange = Maillist.Tables(1).Cell(Counter, 1).Range 
    Datarange.End = Datarange.End - 1 
    .To = Datarange 
    For i = 2 To Maillist.Tables(1).Columns.Count 
        Set Datarange = Maillist.Tables(1).Cell(Counter, i).Range 
        Datarange.End = Datarange.End - 1 
        .Attachments.Add Trim(Datarange.Text), olByValue, 1 
    Next i 
    .CC = "Firstemailaddress; secondemailaddress" 
    .BCC = "Firstemailaddress; secondemailaddress" 
    .Send 
End With
Is it possible to insert this in your RunMerge Macro - so that I can have multiple coloumns in my excel spreadsheet, relating to email addresses, so that I can include a line manager etc to the email that is sent?

Last edited by macropod; 10-13-2014 at 01:58 PM. Reason: Added code tags & formatting
Reply With Quote
  #37  
Old 10-19-2014, 04:57 PM
macropod's Avatar
macropod macropod is online now Mail Merging - Mergeseq + Send Via Email Merge Windows 7 64bit Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi toughiv,

I've been rather busy lately with Uni assignments and the like. Your code snippet seems somewhat unrelated to the macro from the tutorial. With the tutorial's approach, all you need do is to add two extra columns after the existing 'Recipient' column, to hold the CC and BCC mergefields, then make a few changes to the macros:

1. In the 'RunMerge' macro, after:
.MailAddressFieldName = "Recipient"
insert:
.CC = "CCRecipient"
.BCC = "BCCRecipient"

2. In the EmailMergeTableMaker macro, change:
j = 2
to:
j = 4
and change:
.Cell(1, 2).Range.Text = "Data"
to:
.Cell(1, 2).Range.Text = "CCRecipient"
.Cell(1, 3).Range.Text = "BCCRecipient"
.Cell(1, 4).Range.Text = "Data"

Your code snippet also suggests you're contemplating individualised email subjects. Doing that, of course presupposes you have a data field for that. If you do have such a field, it's just a matter of extending the above changes to accommodate yet another column in the mailmerge table.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #38  
Old 10-24-2014, 02:18 AM
toughiv toughiv is offline Mail Merging - Mergeseq + Send Via Email Merge Windows Vista Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Novice
Mail Merging - Mergeseq + Send Via Email Merge
 
Join Date: Jun 2014
Posts: 21
toughiv is on a distinguished road
Default Trouble inserting extra code

Quote:
Originally Posted by macropod View Post
Hi toughiv,

I've been rather busy lately with Uni assignments and the like. Your code snippet seems somewhat unrelated to the macro from the tutorial. With the tutorial's approach, all you need do is to add two extra columns after the existing 'Recipient' column, to hold the CC and BCC mergefields, then make a few changes to the macros:

1. In the 'RunMerge' macro, after:
.MailAddressFieldName = "Recipient"
insert:
.CC = "CCRecipient"
.BCC = "BCCRecipient"

2. In the EmailMergeTableMaker macro, change:
j = 2
to:
j = 4
and change:
.Cell(1, 2).Range.Text = "Data"
to:
.Cell(1, 2).Range.Text = "CCRecipient"
.Cell(1, 3).Range.Text = "BCCRecipient"
.Cell(1, 4).Range.Text = "Data"

Your code snippet also suggests you're contemplating individualised email subjects. Doing that, of course presupposes you have a data field for that. If you do have such a field, it's just a matter of extending the above changes to accommodate yet another column in the mailmerge table.
Hi Macro,

How's Uni going? Hopefully not too hectic?

Thanks for taking the time to help,

I am having a problem, maybe it is because of how I have inserted the VBA lines? Or maybe it is due to the setup of the "RunMerge" Category MM Word file...

I say that last point because Im not entirely sure how the code works for the table (i.e. how it knows the recipient is where I have "email address" merge field.

I have attached a few photos:

1) The error message I am receiving, including the code and the merge document. (That was just a picture)
2) A template of the spreadsheet I am working with.
3) The 123Pow document, excuse the name :P, where I run the macro from.

Hopefully, you'll be able to point me in the right direction!

Thanks!!
MacroPod_Error.jpg

Trial_CC.xlsx

123Pow.docm
Reply With Quote
  #39  
Old 10-24-2014, 06:58 PM
macropod's Avatar
macropod macropod is online now Mail Merging - Mergeseq + Send Via Email Merge Windows 7 64bit Mail Merging - Mergeseq + Send Via Email Merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Upon a closer review I've realised the mailmerge process my code uses, which relies on Word's VBA object model, doesn't support CC and BCC output. Accordingly, a substantial re-write of the code would be required, with Outlook Automation, in order for that to be done. I really don't know enough of how Outlook works to do that. You may get better results using one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at http://bit.ly/1hduSCB
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merging - Mergeseq + Send Via Email Merge mail merge in excel to send pdf forms heyullama Excel 7 12-01-2013 03:32 PM
Mail Merge Many URLs in one email by common email address instantaphex Mail Merge 3 04-29-2013 05:46 PM
Mail Merge to email, changing images on email layout ginelli Mail Merge 18 02-23-2013 09:47 AM
Mail Merging - Mergeseq + Send Via Email Merge Mail Merge with Booklets is Merging all documents into One stapled Booklet 15Degrees Mail Merge 1 01-31-2013 02:06 AM
Send e-mail message in Finish & Merge CDTom Mail Merge 1 08-24-2012 12:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft