TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
varun kumar
NA
4
0
The requested member of the collection does not exist ?
Mar 3 2011 2:39 AM
object oMissing = System.Reflection.Missing.Value;
object ofileName = "E:\\Template.dotx";
Word.ApplicationClass myWordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
Word.Document myWordDoc = myWordApp.Documents.Add(ref ofileName, ref oMissing, ref oMissing, ref oMissing);
myWordApp.Visible = true;
myWordApp.Activate(); // start Word
Word.Paragraph oPara1;
oPara1 = myWordDoc.Content.Paragraphs.Add(ref oMissing);
oPara1.Range.Text = "Heading 1";
oPara1.Range.Font.Bold = 1;
oPara1.Format.SpaceAfter = 24; //24 pt spacing after paragraph.
oPara1.Range.InsertParagraphAfter();
Word.Table oTable;
object objr = myWordApp.Selection;
Word.Range wrdRng = myWordDoc.Bookmarks.get_Item(ref ofileName).Range;
Actually i'm using word template file to create the new word file here.
It shows the error when the cursor come to last line.
I dont know how to solve this problem.
Please give me the solution to this problem
Thanks to all.
Reply
Answers (
1
)
Problem in writing to flie
Erreur dans Csharp