View Single Post
 
Old 09-16-2022, 12:23 PM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by Cosmo View Post
Thanks for the response.

I'll look into that, but I don't understand why this has worked for me with multiple documents before? This seems like it will complicate things a bit, if I now have to provide 2 documents for our users to install, and make sure that both are in place, if I understand what you are suggesting. And I will need to get the proper file path to the correct file in the global template, since I can't just reference the template containing the content itself.
Are your users using your custom UI or just the resulting document?
They are creating documents to go to someone else using your Custom UI?

If in code, you refer to ThisDocument instead of ActiveDocument it gives reference to the file holding the code.

Global templates go in the Word Startup Folder. I can give you code to identify this folder if you need it.
? Application.StartupPath in the Immediate Window identifies it.


Here is a macro
Code:
Sub ShowStartUpPath()
  ' Macro written by Charles Kenyon 2014-02-25
  ' Shows setting for Startup Folder location in Microsoft Word in a message box.
  '
  MsgBox _
    Prompt:="Your StartUp folder location is " & _ 
      Application.StartupPath & _
      "." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & ".", _
      Buttons:=vbOKOnly, _
      Title:="Current Startup Folder Setting Information"
   '
End Sub
Reply With Quote