Consulting

Results 1 to 5 of 5

Thread: writing and editing a macro in current word document, not all documents

  1. #1

    writing and editing a macro in current word document, not all documents

    Hi, we have recently moved to Ofice 365.
    I am struggling to write macros in an explicit document in word. I can write them for all documents or the default template. But when I give a macro a name and choose current document create is greyed out.
    Strangely this behaviour is different in excel where i can create a macro, and edit, in just the current document.

    Hope this makes sense
    All googling just points to document security
    Any help?

  2. #2
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    I don't use Word or Office 365, but, is it a .*docm or a .*doc file?

    also: https://www.howtogeek.com/706392/how...ft-office-365/
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Contributor
    Joined
    Jul 2020
    Location
    Sun Prairie
    Posts
    124
    Location
    You can save macros in documents and have them work with the ThisDocument object. In all but legacy versions of Word, they would be saved in files with a .docm extension. They can also be saved in legacy .doc format files.

  4. #4
    Banned VBAX Newbie
    Joined
    May 2024
    Posts
    2
    Location
    Thanks for the information!

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,217
    Location
    Quote Originally Posted by IreneFCK View Post
    Thanks for the information!
    Well now there's a comment that makes some sense, ... maybe

    Here's a important piece of information for all those who want to paste a comment thats so bland..... dont bother.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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