Macro Issue Between Excel and Word - Page 3

Solved
Previous
  • 1
  • 2
  • 3
  1. Le Pingou Posted messages 12281 Registration date   Status Contributor Last intervention   1 480
     
    Hello,
    In this case, a new provision of the file will not change anything. A breakpoint needs to be set in the procedure [MailMerge(nompubli, nombase, feuilbase, chemin)] at [DocWord.Close False] to see what is happening in the Word document.

    --
    Regards.
    The Penguin
    0
  2. nicodu072 Posted messages 46 Status Member
     
    Hello,
    I have set the breakpoint as you asked me to. Everything goes well until the recipient selection in the mail merge, which remains on the RAx references (see video): https://www.cjoint.com/?BHtnAc7DtW7

    I then created a breakpoint on the old file (from the end of the week without the mailmergewithoutduplicates) to see what was happening, and the recipient update is working correctly: https://www.cjoint.com/?BHtnEqWahX7

    To test, I took the old Word document, where the procedure worked, and replaced it with the new one. Nothing changes, the update doesn’t happen either.
    So, we already know that it doesn’t come from the Word file.
    Now, why does it work on your end and not on mine!
    I tried on a computer running SEVEN (as it seems to me) and it works perfectly.
    I saved it and sent it back to my PC (Vista) and the same issue occurred. But this time the reference remains on Hx, which is the last mail merge launched before saving on the other PC.

    So the problem might be related to the operating system and perhaps to the mailmergewithoutduplicates part? Strange!
    0
  3. Le Pingou Posted messages 12281 Registration date   Status Contributor Last intervention   1 480
     
    Hello,
    Thank you for the information.
    In any case, no part [mailingwithoutduplicates], I’m thinking rather of a missing piece of information in the code...!
    Is the version of MSO under SEVEN 2007 or 2010?
    For now, I haven't found anything.
    Patience because tomorrow I will test on another PC with MSO 2007 and maybe I will find the key to the problem.

    Best regards.
    The Penguin
    0
  4. nicodu072 Posted messages 46 Status Member
     
    Hello,
    So under SEVEN, the version used is MSO 2007. In this case, does that mean that there is a missing piece of information in the code for it to work under Vista?
    How is that possible? Because nowhere do you refer to an operating system.
    Best regards.
    0
  5. Le Pingou Posted messages 12281 Registration date   Status Contributor Last intervention   1 480
     
    Hello,
    Very interesting information.
    Please wait until tomorrow.

    --
    Best regards.
    The Penguin
    0
  6. Le Pingou Posted messages 12281 Registration date   Status Contributor Last intervention   1 480
     
    Hello,
    Well, my test with a PC running Windows Vista and MSO2007 revealed the same problems that you noticed. It seems that under Vista the UAC gets tangled?
    For now, I haven't found out why and therefore the fix.
    I am not losing hope of finding....!

    --
    Best regards.
    The Penguin
    0
  7. nicodu072 Posted messages 46 Status Member
     
    Good evening,
    That reassures me. Don’t worry about it, at least don’t spend too much time on it for me, because I tested it at the office and it works on my PC running Windows Seven.
    I simply won’t be able to use it on my personal PC.
    However, thank you for your help.
    I am still improving the file. If you’re interested, I’ll attach it to you when I’m finished to get the expert’s opinion ;-)..
    Have a good evening.
    Best regards
    0
  8. nicodu072 Posted messages 46 Status Member
     
    Good evening,

    Congratulations!

    The file works perfectly. I didn't take the time to understand all the code, but I noticed that you changed the variable type, specified the database opening in more detail, and created the automatic saving of files in the directory based on a predefined name.

    Thank you again for your help.

    Best regards.
    0
  9. Le Pingou Posted messages 12281 Registration date   Status Contributor Last intervention   1 480
     
    Hello,
    Glad to hear everything is good on your end.
    Actually, as always, when things are not working anymore, I rewrite the code again without considering the existing one, which is why you see a different way of writing. But the problem with Windows Vista is that it does not understand changes in the source file (Excel) unless they have been saved (unlike Windows 7). By the way, if you try the version with the 3 link sheets, you will notice that if you modify the data in one of the tables [Lists...], the Word documents will be incorrect.
    Regarding: the automatic saving of files in the directory based on a predefined name, this is to be able to control the result obtained in relation to the initial request (who goes with whom).

    --
    Best regards.
    The Penguin
    0
  10. nicodu072 Posted messages 46 Status Member
     
    Good evening,
    Very well, thank you for this additional explanation.
    And thank you again for your work.
    Best regards.
    0
Previous
  • 1
  • 2
  • 3