0

I am reaching you out completely aware of my fully unawareness in vba; so I ask assistance with a macro to export from Ms Project Professional certain dates into Ms Project and if possible send it by email at one click

I see some threads partially covering my request but my poor knowledge dont allow me to modify and adjust them.

Quick question before getting into the details, dates even if exported to excel through a vba get there as text field? That is so annoying.

Data i want to export is already in an specific view (named "- Excel Export / Import") but in case needed lets say it would be fulfilling an specific filter (named "- Excel Export / Import") and with the following columns:

Text24
Project
Text14
Task Name
Baseline Start
Start
Baseline Finish
Finish
Actual Start
Actual Finish
Total slack
Text13

Could some one help me please?

James Z
  • 12,209
  • 10
  • 24
  • 44
sergio j
  • 9
  • 2
  • To learn how to export MS Project data to Excel start by searching stack overflow for these tags: [ms-project excel](https://stackoverflow.com/questions/tagged/ms-project%2bexcel). – Rachel Hettinger Aug 29 '20 at 18:18
  • See [Copying MSProject information to Excel](https://stackoverflow.com/questions/28031108/copying-msproject-information-to-excel) and [VBA Copy Paste Data into Excel from Project](https://stackoverflow.com/questions/43882940/vba-copy-paste-data-into-excel-from-project) and [MS Project VBA: Trying to Paste Copied Tasks from .MPP to Excel](https://stackoverflow.com/questions/55142417/ms-project-vba-trying-to-paste-copied-tasks-from-mpp-to-excel). – Rachel Hettinger Aug 29 '20 at 18:21

1 Answers1

0

You could write a custom macro to transfer the data to Excel, but a better option is to use the built-in Export feature to create an Excel file with the data you want.

With the Export Wizard you define:

  • what type of data you want to export (in your case tasks, not resources)
  • which fields to export
  • which subset (or all) of the data to export (e.g. filter)

Once these settings are defined, you can save them as a map which can be used to export the data again without having to go through the setup steps.

To use the Export Wizard, do a File: Save As and select the file type you want (e.g. Excel Workbook). When you click Save, the Export Wizard will appear. Follow the steps in the wizard to define the map. At then end you have the option to save the map to use again.

Note: once the map is saved, it can be used with the FileSaveAs method in a one-line VBA macro to export the data.

Update: If the resulting Excel file has dates/numbers stored as text, they can be converted to the proper format by using Paste Special method to add zero to the cells which coerces the cell value to be numeric. See the answer posted here for more details: Excel VBA Conditional Formatting not executing.

Rachel Hettinger
  • 7,927
  • 2
  • 21
  • 31