Cant change FirstPageTray of Word Document

I am getting below error while assinging the Printer Tray.

System.Runtime.InteropServices.COMException (0x800A1200): Value out of range 
  at crosoft.Office.Interop.Word.PageSetup.set_FirstPageTray(WdPaperTray prop)

here is the code I wrote.

With WordApp.ActiveDocument.PageSetup
                        .FirstPageTray = 261
                        .OtherPagesTray = 261
End With

I am using Office Word Interop in my win application.

Thanks,

Irfan Shaikh
0
Utf
12/22/2009 4:55:01 PM
word.vba.general 1023 articles. 1 followers. Follow

1 Replies
2774 Views

Similar Articles

[PageSpeed] 26

You may find some information at 
http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=183 that will 
help.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Irfan Shaikh (irfan.shaikh@genmills.com)" 
<IrfanShaikhirfanshaikhgenmillscom@discussions.microsoft.com> wrote in 
message news:45A359DF-F5B5-46FB-BE2B-8E8A80B537C9@microsoft.com...
> I am getting below error while assinging the Printer Tray.
>
> System.Runtime.InteropServices.COMException (0x800A1200): Value out of 
> range
>  at crosoft.Office.Interop.Word.PageSetup.set_FirstPageTray(WdPaperTray 
> prop)
>
> here is the code I wrote.
>
> With WordApp.ActiveDocument.PageSetup
>                        .FirstPageTray = 261
>                        .OtherPagesTray = 261
> End With
>
> I am using Office Word Interop in my win application.
>
> Thanks,
>
> Irfan Shaikh 

0
Doug
12/22/2009 7:16:46 PM
Reply:

Similar Artilces:

text box--how to change the amount you can make it bigger or small
How can I change the size of the text box in smaller increments than what Pub 2007 automatically does? I figured it out. Hold down Alt key while moving. why can't I find that in Help. "lindalou" wrote: > How can I change the size of the text box in smaller increments than what Pub > 2007 automatically does? ...

Cannot create new document in Sharepoint Designer 2007
It's new installed under Windows 7 Ultimate x64. After installation, I run it and try to create a new html, but it is disabled. No new document created and the create new button is disabled. Some menu items about contributors settings are grey out. It seems that I have no right to create a new document, but I'm the administrator of the system and the one install this progarm. How to fix this? SharePoint Designer Forum: http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/threads -- Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 -----------...

Cant delete any messages
Hi! My friend at work has a weird problem recently he can't delete any messages in Outlook Express the delete button doesn't work so does not the right mouse button menu delete option. When d&d the files theres a error that says "An error occurred" He works on a normal user account. Any ideas? Have your friend post in an Outlook Express newsgroup. Tell him/her to include the version of OE, the exact error message, and any other pertinent details. Outlook Express and Microsoft Outlook are not the same e-mail client, nor are they related in spite of the similarity of ...

The size of the word-page I writ on
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel The picture of my word-page has turned small, and it does not respond when I try to enlarge it. That is, when I try to draw, from the lower right corner, and by that widen the picture of the page I�m working on. <br> Now the picture is like a tiny box, impossible to work on. <br><br>How to I get back this function? <br><br>And ... how could this have happened? <br><br>Sincerely, <br> AL You need to change your Zoom to something more usable -- it sounds like you...

I am trying to print on legal size paper, i cant set size.
I've tried print option to set up 8.5 x 14 paper put it wont hold the setting. Well, it is to do with your printer driver. Are you sure that the printer supports that paper size? Perhaps you can see if there is an updated driver for the printer. Hope this helps. Pete On Dec 14, 2:26=A0pm, Michele <Mich...@discussions.microsoft.com> wrote: > I've tried print option to set up 8.5 x 14 paper put it wont hold the > setting. =A0 ...

Opening a 2003 document in 2007
I have a form document that was created in 2003. When people try to open the document in 2007, they see all the formating markups and have to go through a somewhat lengthy process every time they open the document to be able to see/print the document without markups, but then the form functions are lost. I've been told that there is no way to fix this, that 2003 and 2007 "don't talk." Surely there is something that can be done so the 2007 users can open the document and use the protected form without going through these steps: Review tab: Tracking: Show Mar...

About change state
After a rule (sales process)has been assigned to an opportunity, it's any way to change this rule or process? ...

cant open file
I have windows vista and microsoft publisher 2007 did my website and now out of nowhere it says cant open file tried everything and is not happening What kind of file are you trying to open? What steps are you taking? What kind of error messages are you getting? Details are important. -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "arleen" <arleen@discussions.microsoft.com> wrote in message news:B264DC25-1072-4931-B44C-7F481A13DBEE@microsoft.com... >I have windows vista and microsoft publisher 2007 did my w...

Before Changing to Quicken
We have all shared a great deal of frustration with Microsoft and Money. And I'll have to admit I haven't seen any help from Microsoft. Most of the help comes from other users. But, Quicken has its own set of problems. Years ago I switched from Quicken to Money because Intuit left me "high and dry" without support. It is hard to tell how much problems Quicken has. Intuit doesn't provide a bulletin board for users to complain on. I don't like what Microsoft has done to us, but my experience with Intuit wasn't any better. Look before you leap. ...

Error and WORD shutdown upon opening files
WORD 2004 continues to shut itself down when opening a document. It seems to happen primarily with documents created with WORD X, but even after saving a document in 2004 version, it still will not open and results in an error. The document starts to open, but before any text can appear, WORD quits. This is the error listed in the error log: Error Signature: Exception: EXC_BAD_ACCESS Anyone else have this happen to them? Any solutions? Here is my computer info: Operating System Information Operating System: Mac OS X 10.3.9 (Build 7W98) CPU: G3 (750), Number: 1, Speed: 499 MHz gestaltPhy...

Changing a cells format
I had some one type in some data for me and when I got it the cell box has a Little green triangle in the top left hand corner- I assume that this means it is a text format. If double click on each cell it changes the format so I can do Sum etc. But we are talking a lot of Data- Is there a way I can select the column and change the format? Or do I have to use a formula in another column? -- Let go, Elevate your life Brent Hauver www.sagehealthstore.com Hi Brent click in an unused cell (maybe even on another worksheet) and choose copy now select the column(s) that you need to change...

How to save an email in My Documents?
Saving an email in My Docs. is unreadable as it goes directly as an envelope into Microsoft Picture & Fax Viewer. This is something new, and frustrating to not be able to save incoming emails . Can anyone help in remedying this, please? I am using Microsoft Outlook Express in Office 2003. Sounds like your .MSG or .EML file extension got associated with the wrong program. Go to Windows Explorer, My Docs, right-click on one of the messages and choose "Open With". Choose the program (Is it Outlook or Outlook Express?) you want to open with and check the box to alway...

Cant get Money to work
when I try to use monwy to set up new account, all I get is "The list is temporarily unavailable. Please try again later." This is the second night in a row that it has done this. Did I buy something that does not work???? In microsoft.public.money, Roaddog_tnkr wrote: >when I try to use monwy to set up new account, all I get is "The list is >temporarily unavailable. Please try again later." This is the second night >in a row that it has done this. Did I buy something that does not work???? What did you buy? What are you trying to install it on? On De...

Tracking textual Data changes beween 2 columns & highlight diff nu
Hi there OK I am tracking Students BTEC grades and am going round on circles The Data Range is the same in both columns A&B. This is arrayed order below Dist* Dist Merit Pass Fail Column A is students Targeted grade and column B is Students current Progress I want to compare the 2 and in column C want to add in a value to express the difference between their targeted and current grades (therefore showing how much the students are passing or failing their BTEC course) Some examples are as follows If A1 = Dist and B1 = Merit Then C1 should show -1 A1=Merit ...

How do I scan document to type on
How do I scan a document to type on and after typing print it. What version of Office do you use? What software came with your scanner? = --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Grandberry" <Grandberry@discussions.microsoft.com> wrote in message = news:88CDA0C9-931C-48E8-9E52-D25C3FD68624@microsoft.com... > How do I scan a document to type on and after typing print it. ...

Mail Merge Formatted Table from Access to Word
I want to merge and entire table from Acces to Word, complete with formatting. I can get records from a table to appear from my Access table in Word , but what if the number of records periodically changes? The formated table in Word will then become obsolete. Is it possible for the table (the actual formatting that displays borders around the records, etc) to be able to contract or expand based on the number of records in the Access table? I haven't figure out how to do this, and the options in Microsft Query don't appear to allow for much formatting. Thanks, Ruben. On Jul 2,...

Opening Excel spreadsheet from Word
All, Previously I have written a macro that opens an excel spreadsheet from a Word document. The following code was used. Set xlDiagnostic = GetObject("c:\run\EVAL.xls") xlDiagnostic.Application.Visible = True xlDiagnostic.Parent.Windows(1).Visible = True I wrote code to copy a graph into the Word document. All was well. Now I want to open a different spreadsheet from Word and put data into various cells. When I use the same code the EVAL worksheet does't open. Insteal, the Personal.xls worksheet open. I should mention that the second macro is being written on a di...

ILC Change
If I change an "Item Lookup Code" will I loose the sales history or will it follow the new ILC? Thanks... Tom On 12 Apr 2007 12:32:03 -0700, "RMS" <mail@woodenwheels.com> wrote: >If I change an "Item Lookup Code" will I loose the sales history or >will it follow the new ILC? No, because the Sales History is on Item.ID .. You lost the "Sales History" only if you delete the item and recreate (but you can restore the history via sql statements) cod ...

How do I change the order of pages in Visio?
I've set up an org chart with multiple pages but want to re-order them. Is there a way to do this? Down in the lower left corner, you'll see a small tab for each page. Grab each tab and move them in the order you wish. Michael "Michael" <win_drift@yahoo.com> wrote in message news:%23rGq3PozJHA.6132@TK2MSFTNGP04.phx.gbl... > Down in the lower left corner, you'll see a small tab for each page. Grab > each tab and move them in the order you wish. > > Michael > Or right click one of the page tabs at the bottom of the page and choose Reorder f...

CRM 3.0
Hello all, Does anyone know if an Excel file can be opened from a custom button added to the Account form? We have added the button to the isv.config file, but the file doesn't open in Excel, it just displays characters in the window that opens. Any help is greatly appreciated. ...

from exchange machine i cant telnet to 25
all machine on customer lan are connecting to exchange server to post mail. when logged into the exchange server i launch cmd prompt and "telnet 192.168.0.10 25" and cant connect to smtp service (i.e from machine that host SMTP so network routing not involved) - netstat -na shows me port 25 is listening - simple mail transfer protocol is running as a service - sending mail via outlook on this server works and also show me a log on my exchange server that it coming from this servers public ip - default smtp virtual server, outbound security set at ANON. - default smtp virtua...

How can I stop format change when copying data into unlocked cells
How can I stop the format changing when I copy data into an unlocked cell in a format protected worksheet? I need to allow people to both enter data or copy data from another source into cells so I have unlocked these cells but also don't want the format of the cells to be changed. If you enter data directly the format does not change but if you copy and paste data it changes the format. I know you can use "copy paste special values" but would like to know if there is some system way of doing this. Copy/paste this into the sheet module. Right-click on sheet ...

How to automatically change the dictionary
Hello, I use Office 2004 and I often write documents and email in both French and English. I have both keyboard layout configured and flip between the language as needed. Unfortunately, each time I need to go in the Tools menu and specify the dictionary I want to use. I there a way to do this automatically? When selecting the keyboard layout? I'm a previous PC user, and Office 2003 was able to automatically detect the language, what's the MAC equivalent? Thanks, Charles In article <40b99439-60d8-4f5e-a5e1-177782881867@f3g2000hsg.googlegroups.com>, cferland <charlesfer...

I have to re setup word?
I'did have problems with my computer, I inserted the Fix disk and know he's asking me to re setup Word, excel....... I put in the original CD and still he can not recognise my. "Microsoft office word is not installed for the this user- set up word to install " I tryed also with the C:\ drive, but still gives me the same error. Hope someone can give me a usefull solution. Thanks in Advance Ann You will probably have to run Windows as an Administrator for the setup to work properly. -- Stefan Blom Microsoft Word MVP "Ann" <Ann@discussio...

Change short keyboard
Hello there I created new procedure instead of sp_help can i change the behavior of Alt+F1 so it can call to my procedure and not for sp_help? ...