Code to Save an Order to the Database

An order can be saved with the status of Basket, Order, Template, or a custom status. In this example, the order is saved to the database with a Template (Saved Order) status. The OrderGroup object is set to Nothing, in order to reuse the variable later in other examples.

This example code requires that you have already created the order and added items to it. For more information about creating an order, seeCode to Create an Order. For more information about adding items to the order, see Code to Add Address and Line Item Information to an Order.

Dim ReqID
ReqID = oOrderGroup.SaveAsTemplate()
' Set object to Nothing in order to re-use
Set oOrderGroup = Nothing

Copyright © 2005 Microsoft Corporation.
All rights reserved.