Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Error message for templates?

Posted on by 3,055

Has anyone else run into the following error message when generating templates to Word (ie, using the screen output option in GP)?

 

Run-time error '509':

The SetDocumentDirty command is not available because the document is locked for editing.

There are three options to choose from: End, Debug, Help

 

We are choosing End and the Word document is fine and can be handled as any other Word document.  We have no idea what the message means.  Our ISP is reviewing to see if they can determine the issue.

The message happens on the SOP and POP sides. In listening to their stories, I think (but have no way of supporting this theory yet) that the message happens when a template (not necessarily the same template) has been used and the document is open in Word.  On the SOP side, it happens when they generate both the Invoice and Packing Slip at the same time but no message appears. The invoice is generated first, then the error message appears. The strange part is that the message does not happen each time they do this though which is why my theory falls apart.  Also, they said it happens when just generating the invoice, but could not remember if the error message happened while leaving open the first invoice generated then generated a second or if it happened when just generating one invoice only.  On the POP side, she generated two separate purchase orders to screen, but not at the same time.  She generated one, then went back to GP and generated the next one.  She was so busy though that she was not paying attention to the Word side, so she could not tell me if the message appeared after generating the first or the second PO.

If you know about this error, is there a way to prevent it from appearing?

Oh, we are on GP 2010 SP1.

*This post is locked for comments

  • Suggested answer
    Dale Coulthard Profile Picture
    Dale Coulthard 3,055 on at
    Re: Error message for templates?

    Just so everyone who reads this is aware, we think we have identified the issue. If you are on Word 2007 in OS Windows 7 and trying to print to a printer.

    The error message happened this morning on the SOP side and during the discussion on what was done prior to printing the template, she realized that she already had Word open prior to performing the template process.

    So, we have now tested printing a single template to screen and to printer when Word was already open.  Word can be open with no document or a document already saved or an unsaved document.  Nothing seems to change the fact that the error message will happen other than (a) having Word already open prior to initiating the template from GP and (b) selecting printer option in GP.  If you choose screen option, the error message is not created.

    I do not know yet if this is a GP 2010 SP1 issue that was resolved in SP2 or if it is a known issue that has not been fixed or if it is an unknown issue to Microsoft.  I hope our ISP can determine soon.

    In the meantime, it appears the only way to prevent the message is to have Word closed prior to creating a template document if you are going to choose the Printer option within GP.

    Our computers are using Office 2007 with a couple on XP and Windows 7 operating systems and GP on SQL 2008 R2.  I have XP and I cannot replicate the error in XP, so I assume this is a Windows 7 with Office 2007 issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans