VBA To Mail Merge And Attach Hyperlink File

Mar 30, 2012

I have an Excel file that has a persons name in column A, company name in column B, email address in column C and a hyperlink to a specific file to be sent with the email in column D.

I have the code to send the email and it works fine.

I've searched the net for mail merge and hyperlinks and have only become confused.

Here is what I want to do, attach the mail merge created file to the email, then the file associated with the hyperlink, I want to attach the actual file from the hyperlink into the email.

View 1 Replies


ADVERTISEMENT

Attach Zip File To Mail Item

Aug 7, 2009

I have 3 routines to (1) create an empty zip folder, (2) place a file into the zip folder and (3) create a mail item and attach the zip folder to it.

The zip folder is successfully created. The mail item is also created and displayed, yet the zip file does not get attached.


Option Explicit

Dim FileNameZip

Sub NewZipFile(strFilePath As String)
If Len(Dir(strFilePath)) > 0 Then Kill strFilePath
Open strFilePath For Output As #1
Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)
Close #1
End Sub

Sub MakeZipFile(strPath As String)

Dim strFileName As String
Dim objApp As Object

With Application
.EnableCancelKey = xlDisabled
.ScreenUpdating = False.......................

View 9 Replies View Related

Mail Macro - Attach Saved PDF File To Email

Nov 21, 2013

I have written a macro but unable to make it work. The macro works but not the way I would like it to.

The macro has to save an excel sheet to a separate folder as a pdf format, a message box should pop up confirming the pdf file and then attach the same saved pdf file to an email.

Now the macro saves the pdf file where I need it to be saved, the msg box pop up and then the pdf file opens up on top of the msg box. If I close the pdf file the msg box which was hidden under the file is now shown. When I click "OK" it goes straight to outlook with the email addresses attached but the saved pdf file is not attached.

I've attached the script.

Sub Macro1()
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:UserReportsPDF Reports" & Range("Q3").Value _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True

[Code] ........

View 8 Replies View Related

Mail Merge Settings For Sending Multiple Mail?

Sep 14, 2012

We need to send multiple mail with attachment with outlook 2007 with option "Resend this message", now we want to use excel for sending the mail.

procedure.----------------------------------------------------------------------------------------------------
S.No. To cc----------------------------------------------------------------------------------------------------
1. xyz@ymail.com----------------------------------------------------------------------------------------------------
2. abc@gmail.com hursh@rediffmail.com, hursh@rediffmail.com, hursh@rediffmail.com, raj@hotmail.com----------------------------------------------------------------------------------------------------
3. ram@ymail.com ramesh@gmail.com---------------------------------------------------------------------------------------------------- 4. rajesh@ymail.com----------------------------------------------------------------------------------------------------
5. raghu@ymail.com raju@hotmail.com ---------------------------------------------------------------------------------------------------- 6. info@ymail.com----------------------------------------------------------------------------------------------------
7. ranjit@excel.com xyx@gmail.com----------------------------------------------------------------------------------------------------and

we have two files for attaching on desktop, one is a excel file and second is a zip file. we want to send the mail with excel mail merge.

View 1 Replies View Related

Automatically Attach And Send By E-mail

Jan 16, 2009

In a generated workbook I have 2 e-mail adresses in seperate cells that I'd like the users to be able to easily send the workbook to.

One as the recipient and the other as cc.

So is it possible to either use a link or userform that takes both adresses and automatically attaches this workbook?

View 13 Replies View Related

Macro - Print Excel Area As PDF And Attach To Mail

Dec 4, 2012

I would like to send a Excel printing area to a mail recipient by using a macro that:

2) Save the printing area as a pdf - file - use a temporary filename
1) Opens MS Outlook mail
3) Attach the temp-file to the mail

View 6 Replies View Related

VBA Send Mail With Lotus Notes Attach ONLY With Worksheet Not Workbook

Apr 22, 2013

I am using a version of the following code that sends a mail using Lotus notes and attaches the Workbook - I am wondering if there is anyway I can make it attach the WORKSHEET instead ?

Code:
'The procedure for executing the main task:
Sub SendWithLotus()
Dim noSession As Object, noDatabase As Object, noDocument As Object
Dim obAttachment As Object, EmbedObject As Object
Dim stSubject As Variant, stAttachment As String
Dim vaRecipient As Variant, vaMsg As Variant

[code]...

View 1 Replies View Related

Selecting A Cell To Attach Hyperlink

Oct 16, 2013

I'm creating a file that holds a list of names with various details held, but what I need to do, is attach a hyperlink to a column 'L' in the same row as the user selects, the user will be able to select the row based upon a unique reference in a listbox in a userform.

I have the following code which attaches the hyperlink to the selected cell, but I'm at a loss as to how I would go about setting the cell based upon the unique reference....

For arguments sake, lets say the unique references are all in column A, and they are 2 to 50 (in rows 2 to 50 for ease of explanation)

The code that I have to insert the Hyperlink is as follows, userform has three buttons and a textbox, but I know that I will need to add the listbox in the form to select the cell to paste

Code:
Private Sub CmdBrowseHyperlink_Click()
'Browse for the file which I want to attach to the cell
Dim FileName As String
FileName = Application.GetOpenFilename()
TextBox1.Value = FileName
TextBox1.SetFocus

[Code]....

View 1 Replies View Related

Mail Merge

Oct 30, 2007

I am a teacher and my department uses Excel for grades. We need to be able to print grade reports for students. We currently use a mail merge to do this, but some teachers are having a hard time with this process. They don't seem to understand using the two programs together.

View 14 Replies View Related

From Pivot To Mail Merge?

Jun 10, 2014

I want to do a mail merge from a pivot table. The pivot looks like this (bit simplified ;-) :

Name JanFebMar
Joe $12 $23 $34
joe(a)test.com $12 $23 $34
Frank $45 $56 $67
frank(a)test.com $45 $56 $67
Alex $78 $89 $90
alex(a)test.com $78 $89 $90

Created with: Name and e-mail as row items, months as columns and cost as values.

In the e-mail I want to address the person by his name and use the right e-mail address to send it. So ideally (I think) the pivot should look like this (e-mail address in the column next to the name instead of under the name):

Name e-mail JanFebMar
Joe joe(a)test.com $12 $23 $34
Frank frank(a)test.com $45 $56 $67
Alex alex(a)test.com $78 $89 $90

Now the problem is that I can't place e-mail in the column section of the pivot... Instead of placing the e-mail addresses vertical beside the name they are place horizontal...

View 5 Replies View Related

Formula To Mail Merge

Jul 28, 2008

I have a sheet of 2000 rows. What I want to do is merge the information into a word document with 8 rows of information on each sheet. These will then be printed and guillotined. what I want is to have the information for the second row to appear under the first one and so in position 9 and the third under that in position 17 and so on so I can just stack the piles up and they will be in order rather than having to sort them all into order. I do not know if there is anyway of tell word what oder to put the records in or if I will have to use a formula in excel.

If I have to do it using excel I need to be able to have a separate column which i can sort and it will then be in the right order for the merge. The first row will be 1 then 9 then 17 (adding 8 each time) up to row 50. Then row 51 is 2, 52 is 10, 52 is 11 up to 100. Then row 101 is 3, 102 is 11 and so on and so on.

View 14 Replies View Related

Mail Merge Into Word

Oct 17, 2008

I have an Excel spreadsheet with names and addresses which I want to mail merge into a letter on word (annual benefit statements). The names and addresses on Excel have been imported from system software and are all in capitals. Is Excel smart enough to be able to keep the first letter of text in a cell but to change the remaining letters to lower case?

View 2 Replies View Related

Getting Junk When Doing A Mail Merge

Jan 1, 2008

I am doing a mail merge and one of my columns is an interest rate. It appears normal in my spread sheet but when I do the mail merge some of the number are extending about ten digits, for example, on my spreadsheet it is 5.75, on the mail merge it would be 5.759999999. It appears to be totally random.

View 9 Replies View Related

Mail Merge Function

Aug 14, 2009

I've succesfully managed to get the mail merge functioning from within Excel at the press of a button. I had a problem initially Word not shutting down properly but have solved this.

The problem I have now is that after the merge has finished and the spreadsheet is saved/closed and Excel is closed, the process tab in Task Manager says that Excel is still running. I found other instances on the net in other forums of people having a similar issue but alas no solutions. The full code for the procedure is below:

Private Sub cbMerge_Click()
Dim wrd As Word.Application
Dim mydoc As Word.Document
Dim lastrow As Long
Set wrd = CreateObject("Word.Application")
wrd.Visible = True
Set mydoc = wrd.Documents.Open("U:TSD3-Projects11-CBRNCBRN-036-CVF HVAC Main Contract-T13212-WorkingECR FolderTESTINGEQR Test.doc")

With wrd.ActiveDocument.MailMerge
.OpenDataSource Name:= _
"U:TSD3-Projects11-CBRNCBRN-036-CVF HVAC Main Contract-T13212-WorkingECR FolderTESTINGECR Log TESTING.xls", _..................................

View 9 Replies View Related

Make A List Mail Merge

Sep 9, 2009

I am looking for a way to make the data mail merge friendly for our clerical staff! The intention is to be able to create a letter to the parents listing the dates absent and unexplained.

There are currently 7 columns ; ID, Surname, First Name, Current Level, Current Form, Absence Date, Absence Code.

I have downloaded and implemented ASAP Utilities and the Transpose funcion is really useful - however it works in predetermined steps - 1, 2, 3, 4 etc rows of data are transposed, depending upon the number you select. Unfortunately there is no such pattern - each student thas a different number of unexplained absences. Some have 1 while others may have 20.

View 9 Replies View Related

Print Labels Via Mail Merge

Sep 30, 2006

I have a database of around 300 names and addresses from which I need to print labels .....

If not what is the best way to do it. Can this file be converted to a doc or mdb file and then mail merge in MS Word. Could somebody please reply at the earliest as I have very little time to create these labels ?

View 7 Replies View Related

How Do I Input Zeroes In A Zip Code For A Mail Merge

Sep 6, 2005

Couple ways:

1) Format the cell as Text: Format->Cells->Text
2) Enter the zip code with a ' preceding the number, i.e. enter 00345 as
'00345
3) Enter the zip code with the formula ="00345" ...

View 11 Replies View Related

Automate A Word Mail Merge From Macro

May 17, 2007

Is there a way i can dictate to Word from an Excel macro that i want it to open, Start a mail merge, use a pre-made file as a template, use the excel file the macro is in as the source, get it through the whole setup of the Mail merge all the way to the print function?

View 9 Replies View Related

Get Hyperlink E-mail Address

May 1, 2008

i have a list of hyperlinks e-mails i would like to translate to TEXT
i have tried using the module posted [url]
it works for web address i need e-mail address

View 4 Replies View Related

Mail Merge - Excel To Word Macro Edit?

May 3, 2012

This macro, enabled in Excel, is part of a chain of macros and will open Word, run the mail merge, save and close Excel. However, there is a macro in Word that I need to run but don't know how to activate it. Is there a code that I am missing that can be added to the end of the macro included?

VB:
Sub Mailmerge()
Dim wd As Object
Dim wdocSource As Object [code].....

View 6 Replies View Related

Excel 2013 :: Trying To Run Automated Mail Merge Via Word

Mar 20, 2014

The database is full of customer bookings and the email side is for sending automated emails regarding There Gift aid donation.

Im trying to run an Automated mail merge from excel via word. Basically im opening an a spreadsheet which has the same information as the Mail merge data source, its a refresh-able Query from microsoft query . I want to be able to click a button that opens up Word and produces an email mail merge and sends it to my outbox. So the emails can be viewed before the final send. I am using Office 2013.

Once i have this stage working i want to eventually move on to having a field on the main spread sheet automatically fill in saying Sent with a Time Stamp.I want to send either email or print a letter depending on what Address/Email information they have.There may also be multiple bookings from the same Customer e.g Restaurant and house booking, which will show separately, and i want to some how have a condition that it puts all the customers Bookings onto one mail merge letter, instead of sending 3 separate letters to one customer.

This is my code so far:

VB:
Sub OpenWord()
'Setting up Word Application Dim wdApp as word.application
On Error Resume Next

Dim wdApp As Word.Application
Dim wdDoc As Word.Document

[Code] .....

View 9 Replies View Related

Data Table Layout Change For Mail Merge

Jun 17, 2013

I have responses from a questionnaire in the format below, and need to mail merge to a word doc.

name
subject
teacher
grade
comment

[Code]....

If I'm right I need it in the following format for a mail merge.

name
subject
teacher
grade
comment

[Code]....

I need to get this fixed by 5 pm tonight, otherwise a foresee a night of copy and paste ahead. I thought pivot tables might work, but alas no, it only tells me the number of the comments i have.

View 7 Replies View Related

Mail Merge From Excel Data To Word Template?

Jul 9, 2013

I am trying (and failing) to set up a mail merge with a Word document. I would like for the doc to take information entered in specific columns and display it in the right field. I've set up the field and the excel doc and went through the mail merge wizard's steps for setting it up but it doesn't seem to be doing what I want.I am attaching the doc and spreadsheet below.

MichaelFields TEST.Contract Entries.xlsxFields Test.Contract to Provide Legal Services.docx

View 2 Replies View Related

Mail Merge Excel Data Into PowerPoint Slides?

Aug 8, 2013

If I have a simple spreadsheet with Name, Class, and date in Columns A, B, and C. Labeled as NAME , CLASS, and DATE acccordingly is there a way to merge that data onto a certificate in powerpoint so the result is a slide of each student?

I can do this in word easily and perhaps the easy answer is to just convert the certficate slide to word and go from there?

View 3 Replies View Related

Using XLSM Spreadsheet As Mail Merge Data Source?

May 13, 2014

I have a database that uses a few basic macros that I would like to use as part of a mail merge ---> Form Letter. Word does not seem to support the use though of xlsm files as a data source though.

Full disclosure - I am using a mail merge form letter to automate the creating of a report that has a LOT of place holders. I 100% realize that there are ways to do this within Excel that would be much cleaner and much easier, but truthfully, I DO NOT have the skills to write the code for it. (The macro I am using was wrote by a wonderful member of these forums. (Snakehips))

Do I have any work arounds to the xlsm / mail merge debacle? Is there a method that I could do that doesn't require years of VBA experience?

View 2 Replies View Related

Moving Duplicate Rows To Columns For Mail Merge

Jul 28, 2008

to prepare an excel spreadsheet for a mailmerge but as all of the info for 1 recipient needs to be in columns instead of rows. I need to convert 2 columns' data into columns but only when there are duplicate invoices, see below;

View 9 Replies View Related

Mail Merge Of Information In One Cell To Numerous Columns

Feb 23, 2010

I have a report that the name and address was put into one cell. I need to put this into numerous columns so I can do a mail merge.

View 9 Replies View Related

Macro To Open Word Mail Merge Document

Mar 5, 2007

I want to set up a one step button in an Excel workbook to open up a Word Mailmerge Document that I have already set up complete with Excel data source. I have used this code so far but it's not working. What else do I have to do?

Sub OpenWordMailmergeMasterB()
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
appWD.Documents.Open Filename:="X:Detention filesMail MergeLesley's MailmergeMASTER Interim Report.doc"

'To Run the Mail Merge
'Data source is a range name in Excel workbook called "MailmergeReport":.....................

View 4 Replies View Related

Mail Merge Multiple Rows In Excel To One Sheet For Reviews?

Aug 20, 2014

So Im working on a project where I want to take the reviews from our employees and put them on letters and email them out. Every employee has 1-4 reviews and multiple questions answered for each- normal mail merge would send someone 4 letters with the review info & I'd love to have it all pulled into one. I made a fake one & attached below. I've tried a couple of formulas I've seen online but none of them have worked.

fake feedback1.xlsx

View 5 Replies View Related

Use Mail Merge From Table To Generate Data In Line Graph?

Jun 25, 2009

I want to generate a letter to parents that shares reading fluency data from an excel spreadsheet into a table and a chart. I got the info to post into cells in the table through mail merge. (sample below) Now I want to make a matching line chart to visually show the student's growth over time. I want the data on the chart to change according to the data I put in the cells in the table through mail merge. Is this possible?The data in the cell that says "Cory" and the "88, 100, 112" are placed in this table through mail merge. I want to now be able to take just Cory's information and display it as a line graph. If I highlight those cells and choose "insert a table" it doesn't work.

FallWinterSpring4th grade standards
70-110 WPM85-120 WPM100-140 WPMCory
88100112

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved