Userform opens another document

N

Noemi

Hi
I have a template which opens a userform on opening.

When a cmdbutton is clicked on the userform then a saved dot (which has
bookmarks saved) opens however I am not sure how to open the dot as a doc.

Documents.Open FileName:="""Sdfsdf sdf sdf sdf sdf.dot"""

also,
once the dot has been opened the code is still running which means I cannot
do anything with the document, how do I end the code from the userform once
the required document is opened.

Thanks
Noemi
 
P

papou

Hello Noemi
To create a new document based on a specified template:
Documents.Add Template:="FullPathToTemplate\TemplateName.dot"

To close Userform :
UserForm1.Hide
Unload Userform1
To stop macro running:
Exit Sub

HTH
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top