I have some code - which until today - was working perfectly:
Sub AddPONo()
Order = System.PrivateProfileString("\\server\dept$\IT\New Purchase
Orders\Settings.Txt", _
"MacroSettings", "Order")
If Order = "" Then
Order = 508
Else
Order = Order + 1
End If
System.PrivateProfileString("\\server\dept$\IT\New Purchase
Orders\Settings.txt", "MacroSettings", _
"Order") = Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "IT00000#")
ActiveDocument.SaveAs FileName:="\\server\dept$\IT\New Purchase Orders\" &
Format(Order, "IT00000#")
End Sub
When I run the code I get an error message :
System Error &H0004005 (-2147467259)
Any suggestions would be fantastic!
Thanks in advance for your help
Sarah xx
Tobias Schröer - 14 Dec 2006 09:37 GMT
Hi,
Sarah_Lecturer schrieb:
> I have some code - which until today - was working perfectly:
>
[quoted text clipped - 29 lines]
>
> Sarah xx
have you used Google for some research? One result points to a possible
access error when saving the file. Is the share you use still available?
In which code line does the error occur?
Tobi