UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Startup Position Of A Custom Form, Office 2013    
 
   
EllenMarie
post Apr 19 2019, 09:56 AM
Post#1



Posts: 212
Joined: 4-August 10



Hello,
How do you control the startup position of a custom form created in Outlook so that the custom form is positioned directly in front of an opened email. The opened email would have the focus and be the active email window.

I tried the following code below (which works in other Office applications), but it is not working in Outlook.
Me.Top = Application.Top
Me.Left = Application.Left

I get the following error message:

“Run-time error 438 error”
“Object doesn't support this property or method”

Thanks in advance,
Ellen
Go to the top of the page
 
DanielPineault
post Apr 19 2019, 10:09 AM
Post#2


UtterAccess VIP
Posts: 6,959
Joined: 30-June 11



Where do you have the code?

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
EllenMarie
post Apr 19 2019, 10:15 AM
Post#3



Posts: 212
Joined: 4-August 10



Hi Daniel,
I neglected to mention that my code is under UserForm_Initialize() procedure of my custom form.

Thanks,
Ellen
Go to the top of the page
 
DanielPineault
post Apr 19 2019, 10:54 AM
Post#4


UtterAccess VIP
Posts: 6,959
Joined: 30-June 11



I think Initialize is the wrong event to use, I'd try something more like
CODE
Private Sub UserForm_Activate()     Me.Top = Application.ActiveWindow.Top
     Me.Left = Application.ActiveWindow.Left
End Sub

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th November 2019 - 07:54 AM