The total number of documents currently open
Current version of Word
Current build of Word
Getting the Position of the cursor
x = Selection.Information(wdInformation.wdHorizontalPositionRelativeToPage)
y = Selection.Information(wdInformation.wdVerticalPositionRelativeToPage)
72pts = 1 inch = 2.54cm
This only works when you are in Page view.
If you are in Normal view it returns the distance from the top margin.
Always set the view to Page view and the magnificationt o 100% before using the Information proeprty to get the cursor position.
Switch to Print Preview
This changes the view to print preview
Application.PrintPreview = True
Define the size of the window on the screen
.WindowState = wdWindowStateNormal
.Height = 400
.Width = 300
Check the File Exists before opening
.FileName = "document.doc"
.Lookin = "C:\Temp\"
If .FoundFiles.Count > 1 Then
'file exists so it can be opened
Is there a document currently open ?
If (Documents.Count >= 1) Then
'a document is currently open
'no document are open
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrev