change logo source and update list filters to include protective packaging

This commit is contained in:
Paul Trowbridge 2022-06-16 10:34:34 -04:00
parent 7bc46ca5d9
commit 48670f9ca7

View File

@ -562,11 +562,14 @@ Sub build_customer_files()
'---------------------logo---------------------------------------------------------------------------------- '---------------------logo----------------------------------------------------------------------------------
fcws.Rows("1:2").RowHeight = 28.5 fcws.Rows("1:2").RowHeight = 28.5
fcws.Cells(1, 1).Select fcws.Cells(1, 1).Select
fcws.Pictures.Insert("https://hc-companies.com/wp-content/themes/hc-companies/images/logo.svg").Select ActiveSheet.Pictures.Insert("https://hccompanies.sharepoint.com/_layouts/15/download.aspx?UniqueId=2ee21088%2Ddad1%2D41aa%2Daf65%2D14b44c46941e").Select
Selection.ShapeRange.ScaleHeight 0.6, msoFalse, msoScaleFromTopLeft 'Selection.ShapeRange.ScaleHeight 0.6, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.IncrementLeft 2 Selection.ShapeRange.ScaleWidth 0.375, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.IncrementTop 2 'Selection.ShapeRange.ScaleHeight 0.52, msoFalse, msoScaleFromTopLeft
'Selection.ShapeRange.IncrementLeft 2
'Selection.ShapeRange.IncrementTop 2
ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Shapes.Item(1), address:="https://hc-companies.com/" ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Shapes.Item(1), address:="https://hc-companies.com/"
ActiveSheet.Cells(5, 1).Select
fcws.Cells(1, 4).value = "Distributor Price List - Effective " & Format(effdate, "MM/DD/YYYY") fcws.Cells(1, 4).value = "Distributor Price List - Effective " & Format(effdate, "MM/DD/YYYY")
fcws.Name = "Full Code Listing" fcws.Name = "Full Code Listing"
fcws.Cells(3, 1).Select fcws.Cells(3, 1).Select
@ -579,7 +582,7 @@ Sub build_customer_files()
Set nwb = Application.Workbooks.Add Set nwb = Application.Workbooks.Add
nwb.Activate nwb.Activate
Set nws = nwb.Sheets(1) Set nws = nwb.Sheets(1)
segment_regex = "G|N|F" segment_regex = "^G|^N|^F|^P"
'---------------------get price list------------------------------------------------------------------------ '---------------------get price list------------------------------------------------------------------------
If pricelevel.chbNURSERY Then If pricelevel.chbNURSERY Then
@ -589,7 +592,7 @@ Sub build_customer_files()
Exit Sub Exit Sub
End If End If
If UBound(pln, 2) > 21 Then If UBound(pln, 2) > 21 Then
segment_regex = "^F|^G" segment_regex = "^F|^G|^P"
Set nnws = nwb.Sheets.Add(, nws) Set nnws = nwb.Sheets.Add(, nws)
nnws.Name = "Price List - Nursery" nnws.Name = "Price List - Nursery"
Call paste_pretty(pln, nnws, effdate) Call paste_pretty(pln, nnws, effdate)
@ -603,10 +606,10 @@ Sub build_customer_files()
Exit Sub Exit Sub
End If End If
If UBound(plf, 2) > 21 Then If UBound(plf, 2) > 21 Then
If segment_regex = "^F|^G" Then If segment_regex = "^F|^G|^P" Then
segment_regex = "^G" segment_regex = "^G|^P"
Else Else
segment_regex = "^G|^N" segment_regex = "^G|^N|^P"
End If End If
Set nfws = nwb.Sheets.Add(, nws) Set nfws = nwb.Sheets.Add(, nws)
nfws.Name = "Price List - Fiber" nfws.Name = "Price List - Fiber"
@ -746,10 +749,12 @@ Sub paste_pretty(ByRef pl() As String, ByRef nws As Worksheet, ByVal effdate As
'---------------------logo---------------------------------------------------------------------------------- '---------------------logo----------------------------------------------------------------------------------
ActiveSheet.Cells(1, 1).Select ActiveSheet.Cells(1, 1).Select
ActiveSheet.Pictures.Insert("https://hc-companies.com/wp-content/themes/hc-companies/images/logo.svg").Select ActiveSheet.Pictures.Insert("https://hccompanies.sharepoint.com/_layouts/15/download.aspx?UniqueId=2ee21088%2Ddad1%2D41aa%2Daf65%2D14b44c46941e").Select
Selection.ShapeRange.ScaleHeight 0.6, msoFalse, msoScaleFromTopLeft 'Selection.ShapeRange.ScaleHeight 0.6, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.IncrementLeft 2 Selection.ShapeRange.ScaleWidth 0.375, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.IncrementTop 2 'Selection.ShapeRange.ScaleHeight 0.52, msoFalse, msoScaleFromTopLeft
'Selection.ShapeRange.IncrementLeft 2
'Selection.ShapeRange.IncrementTop 2
ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Shapes.Item(1), address:="https://hc-companies.com/" ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Shapes.Item(1), address:="https://hc-companies.com/"
ActiveSheet.Cells(5, 1).Select ActiveSheet.Cells(5, 1).Select