Solved

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

Posted on 2009-03-29
4
327 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using web browser with BING 40 119
Weird line on Table of Contents 3 36
Converting large .PDF files. 6 56
Find fonts in Word 2010 32 24
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

776 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