Printing using VBA

T

tk

Here is the code that I am using to print out of Project:

Dim i As Integer
ViewApply Name:="&Gantt Chart"
For i = 1 To Projects(1).Resources.Count
If Left(Projects(1).Resources(i).Name, 4) = "C001" Or
Left(Projects(1).Resources(i).Name, 4) = "C002" Then
FilterApply Name:="&Using Resource...",
Value1:=Projects(1).Resources(i).Name
FilePrint 1, , , , , Date, Date
End If
Next i

When I run the code, all I get is C001 printed out, not C002 also. Is there
something else I need to be doing? Do I need to reset the filter for all
records first
before setting the filter for a particular resource? The goal is to print
out a seperate report
for each resource in the project.

Thanks.
 
J

Jan De Messemaeker

Hi,

I'll have to run this to verify.
But foremost, there is no reason to run through the resources, if you know
the name.
I'll be back.
 

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