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
chetan Allipur
NA
541
167.8k
I am replacing the field with text.So format is not correct
Jul 17 2017 2:57 AM
I am replacing the field with text in Headers. I am getting document page is not showing correct format.
Here is my code.
foreach (Microsoft.Office.Interop.Word.Section section in oWordDoc.Sections)
{
oWordDoc.TrackRevisions = false;
Microsoft.Office.Interop.Word.HeadersFooters headers = section.Headers;
foreach (Microsoft.Office.Interop.Word.HeaderFooter header in headers)
{
//Fields fields = header.Range.Fields;
foreach (Field field in header.Range.Fields)
{
if (field.Type == WdFieldType.wdFieldDocProperty)
{
field.Select();
if (field.Code.Text.Contains("CompanyName"))
{
ap.Selection.TypeText(Manufacturer.Text);
}
else if (field.Code.Text.Contains("ProductName"))
{
ap.Selection.TypeText(Product.Text);
}
}
}
}
}
Please anyone Help me
Reply
Answers (
0
)
'Microsoft.ReportViewer.Common, Version=11.0.0.0 in Sql Serv
How to auto resize and adjust Form controls User System