Needed a example for exporting from MS-Project to Excel

N

nac171 nac171

hi

i am trying to export the data from msproject to excel using macros ,so
can any 1 send me 1 example with syntax for this.
I know that we have to use SAVE AS method..but i am not sure which
argument TO INCLUDE.


Reg
subbu
 
R

Rob Schneider

nac171 said:
hi

i am trying to export the data from msproject to excel using macros ,so
can any 1 send me 1 example with syntax for this.
I know that we have to use SAVE AS method..but i am not sure which
argument TO INCLUDE.


Reg
subbu

Why not turn on Macro Recording, then do a manula File/Save As, pick
maps, pick filters, etc. then look at result in the recorded macro.
 
N

nac171 nac171

hi rob
thanx for ur reply.



Right now i am using vb macro (like vb.. forms).
I invoke the form with the help of short cut keys in msproject.
There is a button in the form named "Export to excel".so when i press this
button, it asks for the file name and should export all the data. from
msproject to that Excel file .
I have done this but it calls the "WIZARD"
i dont want the wizard instead it should export direclty to the excel


So can u send me 1 sample code which does all this thing


reg
subbu
 
G

Gérard Ducouret

Hello nac171,

First of all, you have to creat a map (with the Wizard, why not?) the name
of which is "Exemple" in my VBA proc.
Then you can adapt the following VBA procedure :

Sub ExportExcel()
DisplayAlerts = False
FileSaveAs Name:="C:\Documents and Settings\PragmaAdm\Mes
documents\MP1.xls", FormatID:="MSProject.XLS5", map:="Exemple"
End Sub

Of course, the name of the Excel file (MP1.xls in this example) would be a
variable...

Hope this help,

Gérard Ducouret
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top