Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help needed to view page setup properties

Status
Not open for further replies.

engrfurqan

Programmer
Jan 5, 2009
20
Hi,

I would like to know that is there any other way to look into page setup properties using vba without opening the word document. Actually I have lorge no of files and I need to gather seetings in pagesetup for all the files I am using following code

set doc = documents.open(FilePath)
if (doc.PageSetup.FirstPageTray = wdPrinterDefaultBin = True) Then
.....
doc.Close

for the above code it will open every word document and then close it this whole process is taking too much time and I want to know is there any way around so that I can minimize the running time?

Regards,
Furqan
 
PageSetup is a property of the Document object. It is only exposed when there IS a Document object. There is only a Document object when it is open.

This is different from OLEDocumentProperties such as Title, Subject, Author etc which are members of the DocumentSummary collection. Those can be accessed without opening the file using DSOFile.DLL.

PageSetup? I do not think so, but if someone can state how, I would be interested.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top