J
John Calder
Hi
I have a normal word document that has a macro in it that provides a
sequential number each time I open the document:
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, "00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")
End Sub
This works perfectly ok when I open the document and the select Tools,
Macro, Run.
What I would like to do is place this document on a server (so that it can
be accessed by an number of users) but have it so that when anyone opens it,
the macro will run automatically. (Without having to go to Tools, Macro, Run)
Can anyone help me?
Thanks
John
I have a normal word document that has a macro in it that provides a
sequential number each time I open the document:
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, "00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")
End Sub
This works perfectly ok when I open the document and the select Tools,
Macro, Run.
What I would like to do is place this document on a server (so that it can
be accessed by an number of users) but have it so that when anyone opens it,
the macro will run automatically. (Without having to go to Tools, Macro, Run)
Can anyone help me?
Thanks
John