Click here to Skip to main content
15,923,051 members
Home / Discussions / C#
   

C#

 
Questionopacity problem Pin
Try1-Apr-09 5:40
Try1-Apr-09 5:40 
AnswerRe: opacity problem Pin
musefan1-Apr-09 5:49
musefan1-Apr-09 5:49 
GeneralRe: opacity problem Pin
Try1-Apr-09 8:18
Try1-Apr-09 8:18 
GeneralRe: opacity problem Pin
musefan1-Apr-09 21:39
musefan1-Apr-09 21:39 
GeneralRe: opacity problem Pin
Try2-Apr-09 0:39
Try2-Apr-09 0:39 
QuestionHow to update a field in a word 2007 document? Pin
Krissh1-Apr-09 4:53
Krissh1-Apr-09 4:53 
AnswerRe: How to update a field in a word 2007 document? Pin
musefan1-Apr-09 5:27
musefan1-Apr-09 5:27 
GeneralRe: How to update a field in a word 2007 document? Pin
Krissh2-Apr-09 1:09
Krissh2-Apr-09 1:09 
Code like below below works. But I need to replace the text in a QuickPart in the header.
----
using System.Reflection;
using Word = Microsoft.Office.Interop.Word;
using System.Text;

namespace Word
{
public partial class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;

public Form1() //constructor
{
InitializeComponent();
}

private void button1_Click(object sender, System.EventArgs e)
{
Word.Application app = new Word.Application();

if (textBox1.Text.Length > 0)
{
app.Visible = true; // krister

object template = Missing.Value;
object newTemplate = Missing.Value;
object documentType = Missing.Value;
object visible = true;
object nullvalue = Missing.Value;
object truevalue = true;
object falsevalue = false;
object filepath = "C:\\testdokument.docx";

Word._Document doc1 = app.Documents.Open(ref filepath,
ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue,
ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue,
ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue, ref nullvalue);

doc1.Words.First.InsertBefore(textBox1.Text);
}

object saveChanges = false;
object originalFormat = Missing.Value;
object routeDocument = Missing.Value;

app.Quit(ref saveChanges, ref originalFormat, ref routeDocument);
}
}
}

Java
C#
Gupta Team Developer 3.1
VC++ 2003
Oracle 8i79i
W2K-XP

AnswerRe: How to update a field in a word 2007 document? Pin
Krissh2-Apr-09 2:47
Krissh2-Apr-09 2:47 
QuestionHow to use different Views in Smart client software factory shell form dynamically? Pin
Vapctr1-Apr-09 4:19
Vapctr1-Apr-09 4:19 
QuestionError while using Sub reports in Report Viewer Pin
tauras811-Apr-09 3:03
tauras811-Apr-09 3:03 
QuestionBuilding tree in c# Pin
Reza S1-Apr-09 2:56
Reza S1-Apr-09 2:56 
AnswerRe: Building tree in c# Pin
MumbleB1-Apr-09 2:59
MumbleB1-Apr-09 2:59 
GeneralRe: Building tree in c# Pin
benjymous1-Apr-09 3:09
benjymous1-Apr-09 3:09 
GeneralRe: Building tree in c# Pin
Abhishek Sur1-Apr-09 4:29
professionalAbhishek Sur1-Apr-09 4:29 
GeneralRe: Building tree in c# Pin
Xmen Real 1-Apr-09 6:29
professional Xmen Real 1-Apr-09 6:29 
AnswerRe: Building tree in c# Pin
Abhishek Sur1-Apr-09 4:31
professionalAbhishek Sur1-Apr-09 4:31 
RantRe: Building tree in c# Pin
Le centriste1-Apr-09 5:30
Le centriste1-Apr-09 5:30 
AnswerRe: Building tree in c# Pin
0x3c01-Apr-09 6:59
0x3c01-Apr-09 6:59 
QuestionChange icon of exe file programatically Pin
M.Daud1-Apr-09 2:48
M.Daud1-Apr-09 2:48 
AnswerRe: Change icon of exe file programatically Pin
Curtis Schlak.1-Apr-09 6:06
Curtis Schlak.1-Apr-09 6:06 
Question[Message Deleted] Pin
hkjghkj11-Apr-09 2:10
hkjghkj11-Apr-09 2:10 
AnswerRe: Check Internet connection Pin
SeMartens1-Apr-09 2:22
SeMartens1-Apr-09 2:22 
AnswerRe: Check Internet connection Pin
musefan1-Apr-09 2:23
musefan1-Apr-09 2:23 
General[Message Deleted] Pin
hkjghkj11-Apr-09 2:30
hkjghkj11-Apr-09 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.