wordapplication advice please

HI,

i need to write a word document and while the code in the help works, i need to kno whow to set the pagesize, it seems to be an integer but im struggling to find a list of what they might be.

is there any other examples available to show how this might be done?

Hi Russ,

Eugene Dakin has an excellent book on Xojo and MS Word that likely either has an example of what you are looking for or will get you close enough.

You can find it here

hi @Craig Boyd ,

actually, i did look at that, but the link to the TOC seems to be broken.

@Eugene Dakin is it still available?

Hi Russ,

try reading the TOC from the authors website MS Word and Xojo

:slight_smile:

Thank you!

I shall have to buy it. Not just now though. Watching the election results come in!

Thanks for the kind words Craig.

[quote=185438:@Russ Lunn]HI,
i need to write a word document and while the code in the help works, i need to kno whow to set the pagesize, it seems to be an integer but im struggling to find a list of what they might be.

is there any other examples available to show how this might be done?[/quote]

Hi Russ. There are over 100 examples in the book and if there is something that I missed, feel free to post the question (with a little bit of example code) in the forums and we will create a solution together.

Happy to help!

Thanks @Eugene Dakin

What im struggling with first is that im trying to set the page size to A4 and my printer doesnt support A4 paper, so i get an oleexception. However, the document should still be A4, i know it wont be able to print on the current printer, but thats irrelevant.

how do i set the document page size?

excel.activesheet.pagesetup.papersize =office.xlpapera4