P
Patty
I created a PO with an "AutoNew" number bookmarked.
Please look at my formula and tell my why this doesn't advance to the next
sequential number when I open the template as "New".
***I wanted to start the numbering at 17999 so the next NEW one opened would
be 18000...etc.***
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", "MacroSettings",
"Order")
If Order = "" Then
Order = 17999
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", "Order") =
Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "17999")
ActiveDocument.SaveAs FileName:="Purchase Order" & Format(Order, "17999")
' AutoNew Macro
' Macro recorded 1/26/2007 by Patricia Richardson
'
End Sub
Please look at my formula and tell my why this doesn't advance to the next
sequential number when I open the template as "New".
***I wanted to start the numbering at 17999 so the next NEW one opened would
be 18000...etc.***
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", "MacroSettings",
"Order")
If Order = "" Then
Order = 17999
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", "Order") =
Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "17999")
ActiveDocument.SaveAs FileName:="Purchase Order" & Format(Order, "17999")
' AutoNew Macro
' Macro recorded 1/26/2007 by Patricia Richardson
'
End Sub