Reply
 
Thread Tools Display Modes
  #1   Report Post  
margaritta1601 margaritta1601 is offline
Junior Member
 
Posts: 2
Smile

Fixed the Run-time error 5980!! (Or at least I think I did!)

I'm using Word2003 on XP, therefore I had to tweak the AutoOpen and AutoClose macros in order for it to work as it should without popping any bug report! Nop, it doesn't give me any Run-time error 5980 anymore! YAY!

Sharing the codes below... Please note I was just a lucky beginner! Good Luck!

Sub AutoOpen()
' This macro will reassign the ENTER key when you open an existing
' Word form fields document.
CustomizationContext = ActiveDocument.AttachedTemplate
' Bind the Enter key to the EnterKeyMacro.
KeyBindings.Key BuildKeyCode(wdKeyReturn)
End Sub


Sub AutoClose()
CustomizationContext = ActiveDocument.AttachedTemplate
FindKey(KeyCode:=BuildKeyCode(wdKeyReturn)).Execut e
' Disables prompt to save template changes.
Templates(1).Save
End Sub

Margaritta

Quote:
Originally Posted by margaritta1601 View Post
Hi Dave,

I was wondering how you solve the "bug" issue... This is really frustrating... Please help!

The Macro works well until I password protect my form... that's when the Runtime error 5980 shows up!

Thank you in advance for any light!...

Marg
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The WordPerfect "Reveal Codes" method is so much easier to use. Torden Microsoft Word Help 8 April 19th 10 07:50 PM
Making Word do something that Wordperfect can do NarniaUK New Users 4 May 1st 05 10:44 PM
WordPerfect keyboard macro>Word equivalent? Anty New Users 2 March 13th 05 06:23 PM
letters - ask/fillin Caroline H New Users 2 February 25th 05 08:19 PM
how can you create quickwords in MS Office Word 2003 Christine S Microsoft Word Help 4 February 8th 05 03:01 PM


All times are GMT +1. The time now is 10:57 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"