?
Solved

Creating new files and file names from data within Excel

Posted on 2013-10-27
4
Medium Priority
?
239 Views
Last Modified: 2013-10-27
Not sure if this is even possible...

In a directory I have a template checklist PDF file. In same directory I have a spreadsheet that contains a list of product numbers.

Is it possible to take that template checklist PDF file and add a product number to its file name and then save

Then repeat the process till all the product numbers are attached to the template.

In effect creating new files in addition to the template file.  The directory looking like:
Template Checklist.PDF
Template Checklist_001.PDF
Template Checklist_002.PDF
Template Checklist_003.PDF
etc..
0
Comment
Question by:dgd1212
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:als315
ID: 39603848
Do you like to make copies of your pdf template with new names?
0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39603870
Hi,

pls try

Sub Macro()

strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp))
    strFileCopyTo = ThisWorkbook.Path & "\" & "Template Checklist" & "_" & Format(c, "000") & ".pdf"
    FileCopy strFileCopyFrom, strFileCopyTo
Next
End Sub

Open in new window

Regards
TestPdf.xlsm
0
 

Author Comment

by:dgd1212
ID: 39604220
Thank you!. Works perfect!!
0
 

Author Closing Comment

by:dgd1212
ID: 39604222
Thank you!! perfect!
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question