Word AddOld

Frank_RaemakersFrank_Raemakers Member Posts: 25
A customer has buyed a new pc and installed with Word version 2003.

I got problems with the next codelines

Templatename := 'c:\12345.dot'
CREATE(wdApp);
wdDoc := wdApp.Documents.AddOld(TemplateName);

The last line give the next error:

The call to member AddOld failed. Microsoft Word returned the following message: There is not enough memory. Save the document now.

Other users don't have this problem.

Does anybody know what the problem is?

Kind regards

Frank

Comments

  • DenSterDenSter Member Posts: 8,307
    Does the computer have enough memory? :whistle:
  • Frank_RaemakersFrank_Raemakers Member Posts: 25
    If the memory of the computer was the problem then I didn't ask for help
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Is the problem with all templates?

    Does the message also occur when the template is opened in word manualy?
  • DenSterDenSter Member Posts: 8,307
    Sorry Frank, I was being sarcastic. My wife tells me I have a weird sense of humor.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    She is right :D

    Must be a programmers thing though..

    Sorry; joke... :?
  • DenSterDenSter Member Posts: 8,307
    I was wondering why she calls me a geek all the time :-k

    I have seen a similarly weird message when opening a very large document in Word itself (not from within Navision but from windows explorer), although that document was not large enough to bog down the RAM. It feels to me like this is a Word issue, not a Navision coding issue. If I were to guess I would say there is something going on with your template.

    Try to create a new template with nothing in it, so just base a new template on normal.dot and save it as test.dot and try your code again.
  • Frank_RaemakersFrank_Raemakers Member Posts: 25
    It works.

    The computer has the problem alsoo if you open the .dot document with Word manualy.
    After that conclusion we opened the document as .dot document and saved the document as a .dot file. After that action the problems were solved.

    Thanks for the help suggestions.

    DenSter the greetings to your wife.

    Frank
Sign In or Register to comment.