- 0
VBS - UserProfile Path and File
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft is making Windows 365 Cloud PCs more secure by enabling VBS and HVCI by default
By Usama Jawad96,
- microsoft
- windows 365
- (and 8 more)
- 0 replies
- 0 views
-
Microsoft is making Windows 11 23H2, 22H2 less secure than 24H2 by killing a VBS feature
By hellowalkman,
- microsoft
- windows 11
- (and 11 more)
- 8 replies
- 0 views
-
AMD's Ryzen 9950X3D/9800X3D on Windows 10 beats Windows 11 on Microsoft recommended settings 1 2
By hellowalkman,
- 36 replies
- 0 views
-
AMD finally fixes Windows 10 VBS issue for Ryzen X3D but it does not "fix" performance loss
By hellowalkman,
- 9 replies
- 0 views
-
- 16 replies
- 0 views
-
Question
brink668
Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(0)
Set objShell=CreateObject("Wscript.Shell")
With olMsg
'.To = "test@test.com"
'.CC = "cc@testing.com"
'.BCC = "bcc@testing.com"
.Subject = "While You Were Out: "
.HTMLBody = "<html><p></p>" & _
"<img src='cid:wywo_notification.jpg'>"
I am having trouble with this part. I cant get the file and the userprofile piece to work correctly.
.Attachments.Add strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\wywo_notification.jpg"
The below direct path works but not when adding the userprofile variable
'.Attachments.Add "C:\users\doej\wywo_notification.jpg"
.Display
End With
Link to comment
https://www.neowin.net/forum/topic/1147368-vbs-userprofile-path-and-file/Share on other sites
1 answer to this question
Recommended Posts