Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA/ How to Position Word Document Window and VBE Window Side By Side

Posted on 2009-03-29
4
Medium Priority
?
377 Views
Last Modified: 2013-11-25
In a nutshell: I want to be able to quickly position the word document window (left half of screen) side by side with the VBA code editor (right half of the screen)

I am looking for some VBA code (will probably include api calls) that will position:
1) The window of the word document I am working with (identifying it by application.caption, I suppose) to the top left hand corner of the screen, and resize the window to take up half of the screen horizontally and the full screen vertically.
2) The VBA code editor to take up the right half of the screen.
0
Comment
Question by:PioneerSolutions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24013889
You don't say why you don't simply 'Tile Windows Vertically' with only the two windows open and unminimised.
0
 

Author Comment

by:PioneerSolutions
ID: 24013929
Hi Graham,
I am working with several windows and during debugging sessions I sometimes need to isolate these two windows. Moreover my question is simplified. Long term, I will tweak the exact sizes and positions, as needed.
Regards,
e
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24013942
OK.
I was asking, because I believe that it requires the use of APIs and quite a lot of research. In fact I think that it is more of a project that a question, so if there were already a workaround...
0
 

Accepted Solution

by:
PioneerSolutions earned 0 total points
ID: 24020534
I believe it requires the use of two API's FindWindow and MoveWindow. I am just not sure how to put it all together, including getting the handle (hwnd) of the Word window and VBE window. It may also require the use of CreateObject function and the use of Application.Caption. Again, I am not sure how to put it all together. But from my reading online these seem to be the keys to solving this. Anyways, don't bother researching it. I hope someone with VB experience will come across this question.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question