T
theintern
I have a macro which imports data from Access to Project, including Actual
Start. However, for one of the tasks it doesn't import Actual Start every
other time. First time: doesn't work, second time: does, third time:
doesn't, etc...Not sure how it selects which task for it to fail on either.
see below for code. the import happens at the very beginning. the rest of
it is just maniputaing different views and producing lots of pictures.
any ideas, suggestions would be great!
thanks
scott
Sub ImportAll()
' Imports All
Dim ts As Tasks
Dim t As Task
DisplayAlerts = False
'Imports Data
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="SMmap"
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="PLBmap"
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="PIPmap"
FilterApply Name:="All Active"
'Eliminates all task constraints
SelectAll
SetTaskField Field:="Constraint Type", Value:="As Soon As Possible",
AllSelectedTasks:=True
'Levels Desired Resources
ViewApply Name:="Resource &Sheet"
SelectRow Row:=0
'ATTN: MANAGER edit here to add/delete resource. Resource added:
Height+1.
'Resource deleted: Height-1.
SelectRow Row:=0, Height:=5, Extend:=True
LevelNow All:=False
ViewApply Name:="&Gantt Chart"
'Backfeeds unassigned tasks
FilterApply Name:="Yes"
SelectAll
If Not ActiveSelection = 0 Then
SetTaskField Field:="Constraint Type", Value:="As Late As Possible",
AllSelectedTasks:=True
SetTaskField Field:="Actual Start", Value:="", AllSelectedTasks:=True
End If
FilterApply Name:="All Active"
'Sets proper scale, Weeks and Days
ZoomTimescale Entire:=True
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MajorCount:=1, MinorCount:=1, MinorTicks:=True,
Separator:=True, MajorUseFY:=True, MinorUseFY:=True, TierCount:=2
SelectAll
'Creates first 3 pictures
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\TwoWeeks.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\OneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="C:\Documents and
Settings\deckers\Desktop\pics\Today.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
'Creates SM pic
FilterApply Name:="SM"
'Changes the font/bar size
'GanttBarSize Size:=pjBarSize18
'TextStyles Item:=0, Size:="10"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\SM.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates PLB pic
FilterApply Name:="PLB"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\PLB.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates PIP pic
FilterApply Name:="PIP"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\PIP.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'ATTN: MANAGER edit here to add a snapshot of the new resources workload.
'Copy, paste this section. Then edit code appropriately and uncomment
'(see below for examples)
'Note: don't forget to change the file name in the 2nd to last line of
code here
'Creates "New resources initial here" pic
'FilterApply Name:="Resource Initials Here"
'SelectAll
'If Not ActiveSelection = 0 Then
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
' 'Dislplays hours on the timeline as well
' TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\DFToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
'End If
'Creates DF pics
FilterApply Name:="DF"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\DFToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates GL pics
FilterApply Name:="GL"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\GLTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\GLOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\GLToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates JM pics
FilterApply Name:="JM"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JMTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JMOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\JMToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates JW pics
FilterApply Name:="JW"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JWTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JWOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\JWToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates LG pics
FilterApply Name:="LG"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\LGTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\LGOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\LGToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates MV pics
FilterApply Name:="MV"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\MVTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\MVOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\MVToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Changes size back to normal
'GanttBarSize Size:=pjBarSize14
'TextStyles Item:=0, Size:="8"
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
FilterApply Name:="All Active"
'SelectAll
'EditDelete
DisplayAlerts = True
FileSave
'ATTN: MANAGER Edit here to keep the project open for editing
'FileClose
End Sub
Start. However, for one of the tasks it doesn't import Actual Start every
other time. First time: doesn't work, second time: does, third time:
doesn't, etc...Not sure how it selects which task for it to fail on either.
see below for code. the import happens at the very beginning. the rest of
it is just maniputaing different views and producing lots of pictures.
any ideas, suggestions would be great!
thanks
scott
Sub ImportAll()
' Imports All
Dim ts As Tasks
Dim t As Task
DisplayAlerts = False
'Imports Data
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="SMmap"
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="PLBmap"
FileOpen Name:="<C:\Documents and
Settings\deckers\Desktop\Database.mdb>", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.MDB8", map:="PIPmap"
FilterApply Name:="All Active"
'Eliminates all task constraints
SelectAll
SetTaskField Field:="Constraint Type", Value:="As Soon As Possible",
AllSelectedTasks:=True
'Levels Desired Resources
ViewApply Name:="Resource &Sheet"
SelectRow Row:=0
'ATTN: MANAGER edit here to add/delete resource. Resource added:
Height+1.
'Resource deleted: Height-1.
SelectRow Row:=0, Height:=5, Extend:=True
LevelNow All:=False
ViewApply Name:="&Gantt Chart"
'Backfeeds unassigned tasks
FilterApply Name:="Yes"
SelectAll
If Not ActiveSelection = 0 Then
SetTaskField Field:="Constraint Type", Value:="As Late As Possible",
AllSelectedTasks:=True
SetTaskField Field:="Actual Start", Value:="", AllSelectedTasks:=True
End If
FilterApply Name:="All Active"
'Sets proper scale, Weeks and Days
ZoomTimescale Entire:=True
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MajorCount:=1, MinorCount:=1, MinorTicks:=True,
Separator:=True, MajorUseFY:=True, MinorUseFY:=True, TierCount:=2
SelectAll
'Creates first 3 pictures
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\TwoWeeks.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\OneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="C:\Documents and
Settings\deckers\Desktop\pics\Today.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
'Creates SM pic
FilterApply Name:="SM"
'Changes the font/bar size
'GanttBarSize Size:=pjBarSize18
'TextStyles Item:=0, Size:="10"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\SM.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates PLB pic
FilterApply Name:="PLB"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\PLB.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates PIP pic
FilterApply Name:="PIP"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="C:\Documents and Settings\deckers\Desktop\pics\PIP.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'ATTN: MANAGER edit here to add a snapshot of the new resources workload.
'Copy, paste this section. Then edit code appropriately and uncomment
'(see below for examples)
'Note: don't forget to change the file name in the 2nd to last line of
code here
'Creates "New resources initial here" pic
'FilterApply Name:="Resource Initials Here"
'SelectAll
'If Not ActiveSelection = 0 Then
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
' 'Dislplays hours on the timeline as well
' TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
' EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\DFToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
'End If
'Creates DF pics
FilterApply Name:="DF"
SelectAll
If Not ActiveSelection = 0 Then
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\DFOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\DFToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates GL pics
FilterApply Name:="GL"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\GLTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\GLOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\GLToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates JM pics
FilterApply Name:="JM"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JMTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JMOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\JMToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates JW pics
FilterApply Name:="JW"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JWTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\JWOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\JWToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates LG pics
FilterApply Name:="LG"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\LGTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\LGOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\LGToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Creates MV pics
FilterApply Name:="MV"
SelectAll
If Not ActiveSelection = 0 Then
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (15 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\MVTwoWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=0,
FromDate:=Date - Weekday(Date) + 1, ToDate:=Date + (8 - Weekday(Date)),
FileName:="U:\Estimating Log\Est Schedule\MVOneWeek.gif",
ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#,
MaxImageWidth:=-1#, MeasurementUnits:=2
'Dislplays hours on the timeline as well
TimescaleEdit MajorUnits:=4, MinorUnits:=5, MajorLabel:=23,
MinorLabel:=32, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
EditCopyPicture Object:=False, ForPrinter:=2, SelectedRows:=1,
FromDate:=Date + 0.25, ToDate:=Date + 0.79167, FileName:="U:\Estimating
Log\Est Schedule\MVToday.gif", ScaleOption:=pjCopyPictureShowOptions,
MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
End If
'Changes size back to normal
'GanttBarSize Size:=pjBarSize14
'TextStyles Item:=0, Size:="8"
'Reverts to normal weeks and days
TimescaleEdit MajorUnits:=3, MinorUnits:=4, MajorLabel:=13,
MinorLabel:=20, MinorTicks:=True, Separator:=True, MajorUseFY:=True,
MinorUseFY:=True, TierCount:=2
FilterApply Name:="All Active"
'SelectAll
'EditDelete
DisplayAlerts = True
FileSave
'ATTN: MANAGER Edit here to keep the project open for editing
'FileClose
End Sub