• macro points to username (Word XP Sp2)

    Author
    Topic
    #407529

    I have a macro that points to a template in the startup location for Word. This has always worked fine, except that we need to now change the startup path for citrix to point to c:documents and settings%username%application datamicrosoftwordstartup. When I attempt to use the username variable, I am getting an error message. How can I fix the following code to work for with the variable username?

    If fsGetVariableValue(“letterformat”) = “Personal” Then

    Selection.HomeKey unit:=wdStory

    Templates(“C:Documents and Settings%username%Application DataMicrosoftWordStartupSWFirm.DOT”).AutoTextEntries(“Writer”).Insert _
    Where:=Selection.Range

    End If

    Viewing 1 reply thread
    Author
    Replies
    • #853107

      Templates(“C:Documents and Settings” & environ(“username”) & “Application DataMicrosoftWordStartupSWFirm.DOT”).AutoTextEntries(…

      both this solution and the api solution are at get username

    • #853108

      Templates(“C:Documents and Settings” & environ(“username”) & “Application DataMicrosoftWordStartupSWFirm.DOT”).AutoTextEntries(…

      both this solution and the api solution are at get username

    Viewing 1 reply thread
    Reply To: macro points to username (Word XP Sp2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: