Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Help PLEASE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sarah_Lecturer - 14 Dec 2006 09:25 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.