Link to home
Start Free TrialLog in
Avatar of fabi2004
fabi2004Flag for United States of America

asked on

Pop-Up Msg Box for Word Document

My Word document is a form with simple controls.  I want to remind people to make a copy of it before filling it out.

Is there a way to create a pop-up message box that executes when a Word document is opened from an Office 365 Sharepoint directory?

I tried a simple module with code I found online but it doesn't pop-up when the document opens.  Instead I get assorted warnings about checking out the document to edit and checking it back in.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Is there a way to create a pop-up message box that executes when a Word document is opened from an Office 365 Sharepoint directory?

That is possible when you have the macro enabled word document (.docm)
My Word document is a form with simple controls.  I want to remind people to make a copy of it before filling it out. 
May I suggest to actually create the copy in code instead of just displaying a reminder. This code will create a copy of the open document which can then befilled put and saved.
Sub CreateCopyOfActiveDocument()
    Application.Documents.Add ActiveDocument.FullName
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fabi2004

ASKER

Hi Ryan,

Thank you for your reply.  I did save the form as .docm.
Hi Joe,
:-O it didn't even occur to me.  Not sure I can pull it off, but I love the idea.  I'll try your code and see what happens.  Thank you!
Hi Fabrice,

I started out saving it as a template but after I added a module I was prompted to change to a macro enabled file type.

I didn't know that template's automatically prompted the user to save a copy.  That might be the easiest solution.

I'll have to experiment with it and see what it can do.

Thank you!
After spending hours trying to get a single line of code to work on my template, I'm throwing in the towel.  I can not get a custom message box nor a file save working automatically when the template opens a new document. Neither will anything work when I save it as a macro enabled file as opposed to a macro enabled template.

I'm going to leave it as a simple template file and hope users are smart enough to change the file name when the save as dialogue prompts them.

Frabice gave me the answer I'm ultimately using.  Simply because I'd never noticed a template file opened a new document.  I don't work with Word much, mostly with Excel and Access and apparently there is a difference.

Thank you to all of you who responded.