Microsoft Word Error 5096
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Word-VBA-Error 5096: "PHABETI" Microsoft Office for Developers > Word for Developers Question 0 Sign in to vote hi all .. I have a Word VBA makro that opens files, does some replacements and saves the files again. The makro normaly works fine with all Windows- and Word-Versions (2000-2010). Now I have a customer who has about 40 files, and when the makro runs, he gets the error "5096: PHABETI (filename)". The makro continues with the other files without problems. It is allways another file, that generates the error, and actually it's only 1 file each time. When the makro runs 5 times, 4 times the error occurs, 1 time all is ok. Next time maybe 6trysare necesarry to get an ok for all files. The customer runs the makroon Windows 7, Word-Version is 2007. I have found some informations, that this problems sometimes occurs when saving files (this was allways the problem, notvba, sometimes the problem came with Word 2010), but I have found no answers. One year ago, a had the same problem with another customer with Windows 7 and Word 2007 too. The files are located on a network-drive (in both cases). For me as a first step it wood be very helpfull to know, what this error means (PHABETI is notreally clear). Thanks for your answers. Thursday, May 19, 2011 11:12 AM Reply | Quote Answers 0 Sign in to vote Hi, When you develop target from Word 2007 to 2010, you need some updates your code. I guess that the issue is cause by the changing of SaveAs methond name. Please see the reference below: SaveAs Method (2003) Document.SaveAs Method (2007) SaveAs2 Method (Word) (2010) You can try to change some related codes to fit the new method. I hope this helps. Best Regards, Calvin Gao [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help. Proposed as answer by Bruce Song Thursday, June 02, 2011 11:00 AM Marked as answer by Calvin_GaoModerator Thursday, June 02, 2011 11:09
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Word error when processing multiple documents up vote 2 down vote favorite 1 Right now we have a program that opens all of the https://social.msdn.microsoft.com/Forums/office/en-US/1efe79c6-78bc-4624-a973-6617b1486f8f/wordvbaerror-5096-phabeti?forum=worddev word files in a folder and adds some information to the footer. After switching from Windows XP and Word 2003 to Windows 7 and Word 2007 we have started getting the following error: Run-time error '5096': EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCA (c:\Users...\Content.MSO\8BE508C6.docx) It occurs at random in any of the files (you can be 10 files in or 100). I thought that it might be a problem with the files being on a network drive so I modified the program http://stackoverflow.com/questions/4763476/word-error-when-processing-multiple-documents to copy each file locally first, add the footer to that copy, and then copy it back out to the network. However, that didn't seem to work. I'm looking for any suggestions on how to fix the problem or possibly rewrite the solution. However, I need to keep the solution in VBA since this app is part of a bigger suite which in not ready for a .NET re-write. vba word-vba share|improve this question edited Jan 21 '11 at 20:46 asked Jan 21 '11 at 20:31 skeletank 1,89442456 1 Where does the error happen? (open, close, write ...) –Dr. belisarius Jan 21 '11 at 20:46 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted As it turns out I was able to workaround this problem by copying the word files locally, running the main code on the local copies, then copying them back out to the network. It didn't seem to be working at first because the user's machine on which I tested it did not have the most recent version of the program. share|improve this answer answered Mar 11 '11 at 14:34 skeletank 1,89442456 add a comment| up vote 0 down vote Adding this note for those still looking for answers to this error... I have a macro that creates several docs from one that is
Forum Visual Basic Programming Visual Basic 6.0 Programming Need help in code for Word If this is your first visit, be sure http://forums.codeguru.com/showthread.php?488606-Need-help-in-code-for-Word to check out the FAQ by clicking the link above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 14 of 14 Thread: Need help in code for Word Tweet Thread Tools Show microsoft word Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode November 21st, 2009,07:03 PM #1 en7167 View Profile View Forum Posts Junior Member Join Date Nov 2009 Posts 7 Need help in code for Word Hello all, Is it possible in a Word 2007 document to use a bookmarked word as a microsoft word error SaveAs file name. If not, is there any other way to reference a word to use as the SaveAs file name? Please reply with the code. Your help is very much appreciated. Reply With Quote November 23rd, 2009,01:03 AM #2 HanneSThEGreaT View Profile View Forum Posts CG Bouncer Power Poster Join Date Jul 2001 Location Sunny South Africa Posts 11,223 Re: Need help in code for Word Something like this ¿ : Code: Sub FindBookmarks() ' ' FindBookmarks Macro ' Macro recorded 11/23/2009 by Hannes ' Dim strFound As String Dim stBookmark As Bookmark ActiveDocument.Bookmarks.ShowHidden = True If ActiveDocument.Bookmarks.Count >= 1 Then For Each stBookmark In ActiveDocument.Bookmarks stBookmark.Select strFound = stBookmark.Range.Text Next stBookmark ChangeFileOpenDirectory "C:\Documents and Settings\hannes\Desktop\" ActiveDocument.SaveAs FileName:=strFound, FileFormat:=wdFormatDocument, _ LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _ :="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _ False End If End Sub Here, I store the bookmark's text inside the strFound variable, and then save the document using the strFound variable as a name. This works perfectly if there is only one bookmark present, if you are looking for a specific bookmark, then you'd need to che