stickerslogoboss.blogg.se

Run a mail merge leter in word for mac
Run a mail merge leter in word for mac




run a mail merge leter in word for mac

Worksheets("Surgery Estimate Worksheet").SelectĮxcelPath = ThisWorkbook.Path & "\Estimate of Charges Worksheet.xlsm" Set wordApp = CreateObject("Word.Application") I need to be able to just put a button on the excel file that will merge the appropriate letter, then close the form letter.ĭim wordMergeFields As Word.MailMergeFieldsĭataSource = ThisWorkbook.Path & "\Estimate of Charges Worksheet.xlsm" My form letter is already linked to the data source, and will merge after excel calls it up, but won't merge from the vba. Yes, I did look at the link, but looks like it was trying to open the data source, which is already open, as I am merging from the excel file.

#Run a mail merge leter in word for mac code#

This code runs fine, opens the word merge document, but it does not merge. I have not had any formal training, just tried to pick up info where I could. I so much appreciate your help on this - I'm sure I am missing a lot, as I am really struggling with this. Your assistance would be greatly appreciated! I have been working on this all day and getting nowhere. WordPath = ThisWorkbook.Path & "\Estimated Charges - Letter.doc" I am using Excel 2010, and Word 2010 (but it needs to be compatible with Word 97-03).īecause people will be putting the files into their own folders, I need to set paths (which I picked up from another file), as such:ĮxcelPath = ThisWorkbook.Path & "\Estimate of Charges Worksheett.xlsm" New info would need to be entered to create a second letter, etc. I will only be doing one letter at a time, so it only needs to pull one line of data from the spreadsheet for the letter. I want to run a macro in excel that opens the Word document and merges the data into a letter, then closes the merge file. I have a word document that is set up as a merge letter, named "Estimated Charges - Letter.doc" Those calculations transfer over to a hidden tab in the file with named columns for the data. I have an excel file, "Estimate of Charges Worksheet.xlsm", with calculations on one tab. I have been able to use vba somewhat, by lookiing into other file codes, but I need a lot of help!






Run a mail merge leter in word for mac