Outlook Prf/Automation question

Status
Not open for further replies.

tbone587

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hello all, I am somewhat new to outlook automation and have created my first prf file to automate the creation of a new mapi profile for an exchange account. Everything is working as expected, however when i run the /importprf command and it launches outlook for the first time, it is popping up a window asking for username, password, and a checkbox to remember credentials. Can you please answer the questions below?

  1. Is there a way to populate the username field via the prf or a vb script?
  2. Is there a way to populate the password field via the prf or a vb script ( I assume no )?
  3. Is the only way to import a prf file by command line using the outlook.exe/importprf flag?

Thank you very much!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
1. You can use variables UserName% gets the current logged in user. You can also server variables in paths:

OfflineAddressBookPath=%localappdata%\microsoft\outlook\

2. no.

3. You can use a command line in this format:

Outlook.exe /importprf \\server1\share\outlook.prf
 

tbone587

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Diane,

Thank you very much for the quick response. Can you please elaborate on your response for question 1? I currently have the variable below set with the email address and that works, however after running /path/outlook.exe/importprf outlook launches and it prompts for the user name and password. Im trying to insert that information via the prf to have one less thing to type.

;***************************************************************

; Section 4 - Default values for each service.

;***************************************************************

MailboxName=customer@domain.com

;***************************************************************

; Section 6 - Mapping for profile properties

;***************************************************************

[Microsoft Exchange Server]

MailboxName=PT_STRING8,0x6607

1. You can use variables UserName% gets the current logged in user. You can also server variables in paths:

OfflineAddressBookPath=%localappdata%\microsoft\outlook\

2. no.

3. You can use a command line in this format:

Outlook.exe /importprf \\server1\share\outlook.prf
 
Status
Not open for further replies.
Top