Results 1 to 8 of 8

Thread: resolved:Suppress Merge Field Calculation Errors in Word 2000

Hybrid View

  1. #1
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Suppress Merge Field Calculation Errors in Word 2000

    What do you mean, the table calculates dates? Is it a macro, or VBA code?
    Or does is a program used? What are the calculations?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Suppress Merge Field Calculation Errors in Word 2000

    I formatted your code for easier reading.

    If your query is generating an error from calculating dates then you need to resolve the error in Access since
    you already have displayalerts off.

    Also, when you do ThisDocument.Saved = True you do realize that its not actually saving the document but
    turning off the flag that tells Word if the macro class "ThisDocument" is saved. Dont know why you need
    that when your not modifying the macro code.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    5

    Re: Suppress Merge Field Calculation Errors in Word 2000

    Thanks for the reply

    Dates are calculated using field codes within the Word document that use bookmarks as a reference. Only the original date for the calcuations is retrieved from an access table. This date is referenced in the word document as a bookmark (fromdate). This bookmark is then used in field code calcuations to determine the week-end date for 13 consecutive weeks from 'fromdate'. There is no error in the formatting or calculations of the access data, nor any visible problem with the date calcuations in the word fields - but if I remove the table from the word document which contains the calculations, then what remains in the main document merges to formletters with no errors.

    I'd like to avoid rewriting the date calculations in vba because, as previously stated, the field codes are generating the correct result however something which i cannot pinpoint is causing the merge error.

    If the 'mail merge errors' doc cannot be suppressed I'd appreciate a recommendation on the appropriate forum/website to post the field-codes I'm using for scrutiny by superior users.

    Much appreciate the response so far.

    Cheers

    Xentaur.

    PS. FYI, the ThisDocument.Saved=true is historic code from the original document which only needed to merge one record, used to prevent users from saving the merged document over the original (I've got some fairly ill-educated end-users).

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Suppress Merge Field Calculation Errors in Word 2000

    What errors occur if you turn display errors back on?

    You may have to post your code and the table so we could look at it.


    M$ probably has a service to resolve bugs with their software, unless it turns out not to be a bug, then they charge you. Either way, it'll get fixed, though

    Good Luck!

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Suppress Merge Field Calculation Errors in Word 2000

    You do realize that "ThisDocument.Saved=true" is referring to your macro code and not the actual document.
    To save the actual document you need to do like ActiveDocument.Save to save it or bypass the dirty flag
    by doing ActiveDocument.Saved = True.

    Without seeing your data calculations or other code it makes it harder and I dont want to be guessing. Can you
    attach your document?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width