• WSuseful

    WSuseful

    @wsuseful

    Viewing 15 replies - 61 through 75 (of 218 total)
    Author
    Replies
    • in reply to: Automated replacement of Word template paths #1360631

      Hi Paul

      I keep forgetting to ask if you know what the problem is with the date fix macro?

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360630

      Hi Paul

      As far as I know, the path has never been \TSBVol1R … so that extra folder FilesR remains a mystery.

      I have replaced the code as you suggested and ran the macro yet again on the same folder. It ran for a while then it ‘crashed’, this time with the following error:

      Run-time error ‘6295’
      Office has detected a problem with this file. To help protect your computer this file cannot be opened.

      Debug highlighted:

      Documents.Open StrDoc, AddToRecentFiles:=False, ReadOnly:=False, Format:=wdOpenFormatAuto

      When I then opened this file, it was opened in Protected Mode, with a similar error in Word.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360612

      Hi Paul

      I replaced the code with the one you kindly sent and once again ran the macro for the same person’s folder.

      This time the code ran much more slowly and displayed, for example:

      Contacting ||TSLSERVERFilesRFilesDocGenWord2002Bill of Costs_02.dot

      I am unsure of where the extra folder ‘FilesR’ has come from. It is not in the code, nor on the File Server.

      Eventually the macro ‘crashed’ with the following error:

      Run-time error ‘450’
      Wrong number of arguments or invalid property assignment

      Debug highlighted the following:

      oItem.DateLastModified = StrDtTm

      The error report listed 29 files that it was unable to update and that should be updated manually. Most were Error ‘5180’ files, but some were protected documents. I have been able to open all of these protected documents and I can see that they contain forms with editable fields that have been downloaded from say the Titles Office and I am unable to see which templates are attached, as the document is just re-displayed when I got to Files | Options | Add-Ins | Templates.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360598

      Hi Paul

      I inserted the new code in the two places you indicated and ran the macro again on the same person’s folder, but it ‘crashed’ with the same Run-time error ‘5180’ as it did before, with the same message and same Debug highlight.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360585

      Hi Paul

      The previous file the appeared on the error report and reported that it could not find the template, did process correctly with the new code. All of the templates involved with this process have several macros, but none of the templates are intended to run a mailmerge.

      The very next Word file in the same folder must have tripped up the code when I ran it again, as the template that is attached to that document is the Bill of Costs_02.dot and the code has not updated to the current template path, which still points to the old Novell server path.

      I hope this gives you a suitable clue.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360562

      Hi Paul

      I have just opened the template without problems and just created a new file from it, which also worked fine. I have Administrator privileges, so it could not be a rights issue.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360549

      Hi Paul

      I substituted the code you so kindly sent and ran the macro again and this time it ‘crashed’ with:

      Run-time error ‘5180’
      Word cannot open this document template
      (\TSLSERVER…Bill of Costs_02.dot)

      Debug highlighted the line:

      .AttachedTemplate = NewServer & Mid(strPath, Len(oldServer) + 1)

      The template file it says it cannot open is, of course, there so I’m none the wiser as to why it would display that error.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360540

      Hi Paul

      I’m not having much luck it seems … whilst waiting, I thought I would continue with the template path changes on all of those other files in the Home directory. Armed with your latest code, I ran it on a couple of people’s folders and it ran fine. On the third person’s folder, however, it ‘crashed’ on one of the Word files with:

      Run-time error ’91’
      Object variable or Withblock variable not set

      Debug highlighted:

      .AttachedTemplate = “”

      and the error report displayed:

      Template: \TSLSERVERFilesDocGenWord2002B&W Letter_02.dot not found for H:HomeLizConveyancing19533 ltr to natoli.doc

      I have checked and B&W Letter_02.dot is definitely there, so I don’t understand what it is complaining about.

      Sorry to keep bothering you.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360220

      Hi Paul

      Just when I thought everything was going to be OK and I could just fix those file dates … I am running the code and after doing a significant number of files fine, it ‘crashes’ with:

      Runtime error ’13’
      Type mismatch

      Debug shows:

      ObjFile.ModifyDate = StrTmp

      Initially I moved the offending file out of that tree and ran it again (I can’t run the code from where it has stopped, which is a problem in itself if it strikes an error way down the tree). This time it ‘crashed’ on a different file, so I thought I would ask for your help.

      Sorry to trouble you again.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360215

      Ah yes, if I was only thinking … the Error Report was clearly written to the Normal template.

      Thank you!

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360213

      Hi Paul

      Clearly I’m missing something. I am running Windows 7 on this PC, so when I go to C:UsersGeorgeAppDataRoamingMicrosoftTemplates the only files I can see are Normal.dotm and NormalEmail.dotm there is no Error Report to delete.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1360211

      Hi Paul

      I have just tested the code for the date fix and although the test code only displayed 65 entries, the 143 is correct and the code does work!

      Thank you very much! It is really appreciated!

      All that remains now is to fix that strange problem of the error code report being displayed every time I run Word and there is nothing I can do to remove it.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1359907

      Hi Paul

      1. That’s an easy solution to add the macro to a document instead of the Normal template. Thank you, that’s resolved.
      2. I ran the test code, but even though your code says “For i = 0 To 150” the display box only display 65 entries and Content Created is not one of them.
      3. That3.
      3. That weird display of the error report keeps coming up no matter what I do, each time I open Word.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1359874

      Hi Paul

      One other thing. I’m probably not doing it right, but I am unable to add your macro to existing macros, because I am unable to ‘separate’ them and make yours unique. The only way I can run it is to remove all the others, so yours is the only one.

      Clearly there must be a way for the macro to pick up those statements (declarations?) above Sub Main () but unless it’s the only macro it doesn’t.

      Thank you.

      Regards
      George

    • in reply to: Automated replacement of Word template paths #1359873

      Hi Paul

      Sorry to bother you, but something very strange is happening as I continue to run that macro for other files that need the new template paths.

      When an error report is created, I am unable to ‘get rid of it’. Whether I close the file, or save the file, or exit Word, the error report just re-appears as soon as I open a new file, or re-run Word (when a new document is started automatically).

      It must be a simple code change, I hope.

      Regards
      George

    Viewing 15 replies - 61 through 75 (of 218 total)