For orders with ShipPartial unchecked, can’t ship the order because one product has inadequate
inventory:strTitle = “Inadequate inventory”
strPrompt = “Only “ & lngCasesInStock _
& “ cases in inventory; can’t fill Order ID “ _
& lngOrderID & “ for “ & strProductName
MsgBox strPrompt, vbExclamation, strTitle
GoTo NextOrder
ElseIf blnShipPartial = True ThenFor orders with ShipPartial checked, can’t ship this product on the order:strTitle = “Inadequate inventory”
strPrompt = “Only “ & lngCasesInStock _
& “ cases in inventory; can’t fill “ _
& strProductName & “ item on “ _
& “Order ID “ & lngOrderID
MsgBox strPrompt, vbExclamation, strTitleFigure 12.4 shows a typical “Inadequate inventory” message when there isn’t enough inventory to
fill a product line item on an order with ShipPartial checked.FIGURE 12.4
A message indicating that there is inadequate inventory to ship a product item on an order.Check the next product on the order:GoTo NextProduct
End If
ElseThere is enough inventory to ship this product; create a new labels document for this set of labels
from the template:Set doc = _
appWord.Documents.Add(Template:= _
strTemplateNameAndPath, _
documenttype:=wdNewBlankDocument, _
Visible:=True)
doc.ActivatePart II Writing VBA Code to Exchange Data between Office Components