Consulting

Results 1 to 5 of 5

Thread: Macro for saving a macro enabled file to a non macro file

  1. #1

    Macro for saving a macro enabled file to a non macro file

    I am new to using Macros. I created a macro enabled form with a few drop down lists and a submit button that will save a copy of the file (non macro, with the drop down list disabled) to a specified folder using a specific file name with current date and time in the file name. Is this possible? Any help would be appreciated.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,351
    Location
    You're approaching this the wrong way. Instead of using a macro enabled document as the basis of your process, you should use a macro enabled template. Word's default save format for documents is docx - which is not a macro-enabled format. Even so, provided the document remains on the same system as its template, the saved document will continue to have the functionality provided by the macro.

    As for saving with a
    drop down list disabled, doing that depends on the type of dropdown - which you haven't told us about.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3

    Macro for saving a macro enabled file to a non macro file

    I have attached a copy of the file here. I want to write a macro that will save a copy of the file in word document (without the content control andthe dropdown list) with specific file name and date eg. Manpower Requirement ddmmyyyy and with all blank font. Not sure if a macro can do that.
    And is a macro possible to ensure all fields (content control and dropdown list) are completed before saving a copy of file? Sorry i hv limited knowledge of macro.
    Thanks.
    Attached Files Attached Files

  4. #4
    VBAX Regular
    Joined
    Jul 2020
    Location
    Sun Prairie
    Posts
    73
    Location
    You have a number of questions, it would seem. I am just writing to emphasize the point made by Paul that you seem to have missed. You want to be using a Template file (.dotm) not a document file. Templates in Microsoft Word
    Search for data validation macros. You may find some on Greg Maxey's site. Validate Content Controls Entries

    Looking at your form, you are using Content Controls, which is likely the best. You can set content controls to be deleted when edited. This is in the Content Control properties.

    Note that you cannot force a user to allow macros to run.

  5. #5
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,351
    Location
    Cross-posted at: Need help in content control (msofficeforums.com)
    Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq...._new_faq_item3
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

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