i've generated a word document from VB with Custom paper size 10" X 12".(we have a preprinted paper format of size 10" X 12").But while printing from word its taking default paper source as Letter which is 8.5" X 11".so i dont get page break properly while printing .(although it leaves page break properly in the word document.)how to solve this problem?
i've already specified as
Dim objword As New Word.Application
Dim objTargetDoc As Word.Document
Set objTargetDoc = objword.Documents.Open("....")
and it appeared to work fine for me. (The InitWordDoc proc just creates the document and sets the margins to 1" around.)
Of course, I do not have the 10x12 paper so it informed me it was outside the boundaries and asked whether to continue, to which I responded "yes". But otherwise it worked.
I'd check what state the document is in by doing a print-preview and/or making Word visible to examine the document state. I can help you with this if you need guidance on how to do it.
NOTE:
By the way, I think you can replace all the lines around
Hi vaishnavi,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept bruintje's comment(s) as an answer.
vaishnavi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
SpideyModCommented:
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
you can try something like this
Sub SetPrintProps()
With objword.ActiveDocument.Pag
.PageWidth = InchesToPoints(10)
.PageHeight = InchesToPoints(12)
End With
End Sub
HAGD:O)Bruintje