none
vba code lost moving from PC to PC RRS feed

  • Question

  • I have a Mail Merge project using Access as the source. It was developed on a Win7 PC using Office 2007 SP3. I then transfer the files to a XP PC via my network (also with 2007 SP3) for further testing.  

    However, when opening the Word doc and going through the merge procedure, I find the code in the sample below has been removed. It's the only code in the document, BTW.

    I don't know if there is a problem between Win7 and XP; I have not been able to get to other PC' at this stage to explore this.  There is a couple of threads over in the Access Forum on this subject, but none of the suggestions were able to help me.

    Any ideas?



    Cheers,


    • Edited by UTSUPPORT Sunday, February 26, 2012 6:25 AM amend title
    Sunday, February 26, 2012 6:22 AM

Answers

  • Well..I got it to work.

    I had to set "Disable all macros...." in the Trust Centre, on the XP machine.

    I overlooked this setting because I thought Macros and VBA were two different things.

    Obviously not.


    Cheers,

    • Proposed as answer by Bruce Song Thursday, March 1, 2012 2:49 AM
    • Marked as answer by Bruce Song Thursday, March 8, 2012 10:06 AM
    Wednesday, February 29, 2012 6:50 AM

All replies

  • What is the format of the document on both PC's that are suppose to have the macro embedded?

    Kind Regards, Rich ... http://greatcirclelearning.com

    Sunday, February 26, 2012 9:04 PM
  • Rich Michaels  - not sure what you mean by format.  It's a .doc if that is what you mean, and there are no Macros, just VBA.

    UPDATE.

    I have just tested this on another Win7 PC with Office 2007 SP3, and it works just the same as the Win7 development PC.  So, it's a Win7 to XP issue.  Just what, I hope someone here will know.


    Cheers,

    Monday, February 27, 2012 3:48 AM
  • Yes I did mean the document format as either the old binary ".doc" or the new XML format of ".docx".  However, if there are macros in documents the format extension would be ".docm" or ".dotm" if it was a template, otherwise the macros are stripped from the document or template.

    If your document was not saved as a macro enabled document (.docm) then I don't know how the macro's would exist in the document in either the XP or Win 7 platforms.

    Are you sure the macros are actually in the document and not a global template on the Win 7 machines?


    Kind Regards, Rich ... http://greatcirclelearning.com

    Monday, February 27, 2012 3:25 PM
  • There are no macros.

    The file will transfer to a Win7 PC with its VBA code intact, but not to a XP PC.  I have tried zipping the file as suggested in the Access forum, but still NOGO.


    Cheers,

    Monday, February 27, 2012 10:25 PM
  • Well..I got it to work.

    I had to set "Disable all macros...." in the Trust Centre, on the XP machine.

    I overlooked this setting because I thought Macros and VBA were two different things.

    Obviously not.


    Cheers,

    • Proposed as answer by Bruce Song Thursday, March 1, 2012 2:49 AM
    • Marked as answer by Bruce Song Thursday, March 8, 2012 10:06 AM
    Wednesday, February 29, 2012 6:50 AM