M
Margaret Upton
In Word 2003 running Windows XP I used this macro to generate a number into
an invoice. It relied upon a file called Settings in C:\. It does not run
any more and when I press debug it highlights the part below. Have pasted
in the whole macro. Again, please can anyone help.
Margaret
System.PrivateProfileString("c:\Settings.txt, "MacroSettings",_
"Order") =+1 section
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, "00#")
an invoice. It relied upon a file called Settings in C:\. It does not run
any more and when I press debug it highlights the part below. Have pasted
in the whole macro. Again, please can anyone help.
Margaret
System.PrivateProfileString("c:\Settings.txt, "MacroSettings",_
"Order") =+1 section
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, "00#")