Y
Yohan
Here is what I'm trying to do: Filtering the schdule by date range and
then showing it by resource. After that I want to save it to a disk as
a GIF file by resource name. I was able to loop throw the resource and
filter it by date range succefully. but when I want to save the output
as a Gif file its not working!! Is there a way to save whatever on the
ms project screen to a file? here is my code
Sub Macro1()
Dim r As Resource
Dim mystring As String
For Each r In ActiveProject.Resources
If r.Assignments.Count > 0 Then
mystring = r.Name
SelectAll
ZoomTimescale Selection:=True
FilterEdit Name:="Date &Range...", TaskFilter:=True, Create:=True,
OverwriteExisting:=True, FieldName:="Start", test:="is greater than or
equal to", Value:="08-25-2008", ShowInMenu:=False,
ShowSummaryTasks:=True
FilterEdit Name:="Date &Range...", TaskFilter:=True, FieldName:="",
NewFieldName:="Finish", test:="is less than or equal to",
Value:="09-05-2008", Operation:="And", ShowSummaryTasks:=True
FilterApply Name:="Date &Range..."
FilterEdit Name:="Resource", TaskFilter:=True, Create:=True,
OverwriteExisting:=True, FieldName:="Resource Names", test:="equals",
Value:=mystring, ShowInMenu:=False, ShowSummaryTasks:=True
to", Value:="08-31-2008", Operation:="And", ShowSummaryTasks:=True
FilterApply Name:="Resource"
MsgBox (r.Name)
EditCopyPicture forPrinter:=pjGIF, FileName:="C:\" & r.Name &
".gif"
End If
Next r
End Sub
then showing it by resource. After that I want to save it to a disk as
a GIF file by resource name. I was able to loop throw the resource and
filter it by date range succefully. but when I want to save the output
as a Gif file its not working!! Is there a way to save whatever on the
ms project screen to a file? here is my code
Sub Macro1()
Dim r As Resource
Dim mystring As String
For Each r In ActiveProject.Resources
If r.Assignments.Count > 0 Then
mystring = r.Name
SelectAll
ZoomTimescale Selection:=True
FilterEdit Name:="Date &Range...", TaskFilter:=True, Create:=True,
OverwriteExisting:=True, FieldName:="Start", test:="is greater than or
equal to", Value:="08-25-2008", ShowInMenu:=False,
ShowSummaryTasks:=True
FilterEdit Name:="Date &Range...", TaskFilter:=True, FieldName:="",
NewFieldName:="Finish", test:="is less than or equal to",
Value:="09-05-2008", Operation:="And", ShowSummaryTasks:=True
FilterApply Name:="Date &Range..."
FilterEdit Name:="Resource", TaskFilter:=True, Create:=True,
OverwriteExisting:=True, FieldName:="Resource Names", test:="equals",
Value:=mystring, ShowInMenu:=False, ShowSummaryTasks:=True
to", Value:="08-31-2008", Operation:="And", ShowSummaryTasks:=True
FilterApply Name:="Resource"
MsgBox (r.Name)
EditCopyPicture forPrinter:=pjGIF, FileName:="C:\" & r.Name &
".gif"
End If
Next r
End Sub