Hi everyone. This macro is meant to work in a word doc except it doesn't work. It is supposed to allow the user to print multiple copies of a single word document with a page number designation at the bottom of page to the right. In the lower rigth corner of word doc is bookmark named {Order}.
I am getting an error on ActiveDocument.Bookmarks line. Any suggestions?
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", _
"MacroSettings", "Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", _
"Order") = Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "1#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "1#")
End Sub
I am getting an error on ActiveDocument.Bookmarks line. Any suggestions?
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", _
"MacroSettings", "Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", _
"Order") = Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "1#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "1#")
End Sub