Hi,
Code given below work well for saving file on my desktop but when I enter from different location with different user name in a network environment, it doesn't save at users desktop.

I am pretty sure there should be a way to save file at user desktop in a Network environment.

I need someone to help me to fix it.

Thanks


Sub SavePdf()
Dim FirstLine As Long, NumberOfLines As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False

ThisWorkbook.Save
With ActiveWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule
         
        FirstLine = 1
        NumberOfLines = .CountOfLines
         
        .DeleteLines FirstLine, NumberOfLines
         
    End With

ThisWorkbook.SaveAs Filename:="J:\QC\LEVEL 2\Porject Reference # " & Range("C1").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Documents and Settings\ray\Desktop" & Range("C1").Value _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=False
Application.Quit
Application.ScreenUpdating = True
Application.DisplayAlerts = True

End Sub