C Sharp :: How To Shrink Size Of Word Documents By Changing Format Settings

Jul 31, 2012

I've created a solution who exported Access reports (graphics/tables) to a Word- and a PDF-format. Therefor I use PDFSharp and PDFFocus.

The PDF document is okay. But the Word-document looks good. Only the size of the Word-document, it has to send by e-mail, is much too big (17MB).

I have to open the Word document again to change the PageSettings to be sure, that the page-margins and the print orientation are correct.

using System;
using Microsoft.Office.Interop.Word;  
namespace PageSetup {
    class TestPageOrientation {
        static void Main(string[] args)

[Code] .....

I don't know how it works in the Word-library source. But I've tried WdOrientation.wdOrientPortrait and once I was surprised. I saw this page in Landscape-format.

I think there is something wrong with my document sections, because the documents (with a lot of tables, graphics and a image) is much too big. And that's only after using this method.

So my next question is: How can I shrink the size of this Word document?

And what do I have to do to limit the amount of format-settings in this word-document?

View 1 Replies


ADVERTISEMENT

C Sharp :: How To Create Multiple Word Documents Dynamically

Sep 18, 2013

Need to create multiple word documents on the run.

My problem is its creating the last one only.

View 1 Replies View Related

C/C++ :: Opening Word Document In Turbo Or Any Program In Word Format

Mar 20, 2013

I have a problem to open word document into turbo c++. i don't know how to open if the documents are in word format.

View 1 Replies View Related

C Sharp :: How To Create Manual Printer Settings

Jan 19, 2014

My professor assign me a task to create a manual printer settings, not necessary same as printer setting the important thing to do is to have a combobox. In the combobox that you will see the available installed printers, and one command for print that if going to select one available printer in the combobox. It is possible ?

View 1 Replies View Related

C++ :: Format For Changeable Size Array?

Jun 22, 2013

I'm making a program that hold a list of strings (commands) in memory, displays it with a GUI and also sends any of these strings to a USB port.

I'm thinking of holding the strings in a vector that is initialized in a class with methods to add or delete strings (commands). Should I store these string in the vector or pointers to string? Or is there a better way?

View 8 Replies View Related

C++ :: Macro For Changing Array Size

Nov 22, 2013

I'm trying building a new macro for change the array size:

#define redim(varname,x) ((sizeof(varname)*) realloc (varname, x * sizeof(varname)));
int b;
redim(b,3);

error message:
"error: expected primary-expression before ')' token"

what isn't right with these macro?

View 10 Replies View Related

C++ :: Changing Text And Window Size?

Jul 4, 2014

I would like to find out a way to set the text and window sixe for the window in c++. I am using code::blocks compiler

View 4 Replies View Related

C Sharp :: Input String Was Not In Current Format?

Nov 18, 2012

error is giving.

int ages = 0;
ages = int.Parse(textBox2.Text);  
if(textBox2.Text == "")
{
MessageBox.Show("Age Blank  ......");  
}
else if (ages >= 5 || ages <= 9)
{
MessageBox.Show("age must be 5 to 9 only");
}

View 1 Replies View Related

C Sharp :: Input String Was Not In Correct Format

Apr 28, 2012

List<Byte> Pt_split(string plain)  {
            List<Byte> pb = new List<Byte>();
            // Byte p;
            string p;
            int temp = 0;
            if (plain.Length % 2 != 0)

[Code] ....

View 2 Replies View Related

C Sharp :: String Format Removing Leading Digits

May 7, 2014

In formatting strings, how would I only get the decimals?

So, 1.456 would be .456(no digit before the decimal). I have seen a lot on removing the decimals or rounding to a certain place.

View 1 Replies View Related

C Sharp :: Display Data In Richtext Box In Tree Format?

Jan 31, 2013

I want to display my data in rich-text box in the tree like structure,i fetch the data from the data base MSACCESS & i want to print it on my rich-textbox, what can i do ?

exampale is :-A
|
|__A1
| |_A1_1
| |_A1_2
|__A2
|__A3
|_A3_1
|_A3_2

like this in rich textbox

View 1 Replies View Related

C Sharp :: How To Convert Date In Integer Format To DateTime

Jun 8, 2013

How do I convert date in integer format to DateTime without using DateTime?

I have tried:

Regex regex = new Regex(@"^(0[1-9]|1[012])(0[0-9]|1[0-9]|2[0-9]|3[01])(1[789]|[2-9][0-9])dd+$");
if (regex.IsMatch(txt_fromdate.Text) == true)
            {
                DateTime dt = DateTime.ParseExact(txt_fromdate.Text, "MMddyyyy", null);
            }

View 1 Replies View Related

C Sharp :: Changing If Statement During Runtime When New Control Is Added

Apr 18, 2013

This is for excel . I have a form with 2 combobox and 1 textbox ...

combo 1 : user can select a column ; let say column A
combo 2 : user can select an operator ; let say = (equal)
textbox : user can enter value ; let say 2

so my code is like

if (column A == tb.text) {
    execute code here
}

but the problem i have is during run time i allow user to add more controls to the form

if ((column A == tb.text) && (column B == tb2.text)) && //may be more if user add {
   execute code here 
}

how do i handle this 'cause, how many will the user add to it, and the code should change when user add new control to it.

View 1 Replies View Related

C/C++ :: How To Access XML Documents

Apr 9, 2012

this is the XML document i have:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<ConfigParams>
<Param Name="1">1857</Param>
<Param Name="2">10.31.225.163</Param>

[Code] ....

How to write a C++ code to access thing. (like we use JAXB in java)

View 1 Replies View Related

C Sharp :: Getting Error When Word Add-in Run

Oct 19, 2014

I want to copy the word entered by a user as soon as the user presses space(Just like the spell checker in word editors do). I'm using the following code:

private void ThisAddIn_Startup(object sender, System.EventArgs e) {
        ConsoleKeyInfo info = Console.ReadKey();
        if (info.KeyChar == ' ') {
            Word.Range rng = this.Application.ActiveDocument.Words.Last;
          
[Code] .....

I'm getting the following error: An exception of type 'System.InvalidOperationException' occurred in mscorlib.dll but was not handled in user code. For the following line:

ConsoleKeyInfo info = Console.ReadKey();

View 1 Replies View Related

C++ ::  Any Possible Way To Shrink Array With Delete Operator

Sep 18, 2014

We can't use the std::vector, std::map and std::lists implementations.

std::realloc doesn't call the destructor automatically.

If it is theoretically possible, we'll consider it and write lines similar to it, which should remain commented until something similar is possible.

int main(){
#define START 1000000000
#define END 10
unsigned int * array=new unsigned int[START];
delete[START-END]array;//Our suggestion to shrink the array
delete[]array;//Delete the array
return 0;
}

View 18 Replies View Related

C Sharp :: Save Word File And Open It Using Net Framework

Apr 17, 2013

i have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly

it is the code

DocumentModel document1 = new DocumentModel();  
Section section1 = new Section(document1);
document1.Sections.Add(section1);  

[Code]....

View 1 Replies View Related

C++ :: Inherit Class Variable - Shrink Duplicate Dataset From CWorksheetTwo?

Mar 30, 2012

Code:
class CUser {
public:
CUser();
~CUser();
protected:
std::string firt_name;
std::string last_name;

[Code] .....

How would I go about shrink the duplicate data set from CWorksheetTwo? For CWorksheetTwo has both CUser and CUserEx, and I only need CUserEx, and all other classes are happy with CUser

Since there is no such thing virtual variable what are my choices? In CWorksheetTwo set users to NULL and use another exclusively? Change CSettings variable to template <class T> std::vector<T>users?

View 6 Replies View Related

C Sharp :: How To Remove All Format Of Video File And Flash File

Dec 11, 2012

I am creating small application using c#.net.I removed all image tag using regular expression no I want to remove all video file and flash file also in source code of webpage.

so far I have tried this ...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

[Code] .....

View 1 Replies View Related

C Sharp :: Get Line Number On Mouse Position In Microsoft Word Document?

Aug 10, 2012

How to get line number on mouse position in Microsoft word document using winWordControl within windows form?

View 1 Replies View Related

C Sharp :: Alter Size Of Flash Movies?

Nov 5, 2012

I have a flash movie that is bigger than the axShockwaveFlash placeholder that plays it. The axShockwaveFlash placeholder expands to the size of the movie.

I have found a website at [URL] but asp is totaly different from c#.

How can I make the movie shrink to fit in the axShockwaveFlash placeholder?

View 2 Replies View Related

C Sharp :: Array Size Limitation Is Too Small

Mar 24, 2013

I am having difficulty with arrays because of the limitation of the size of the arrays that I can declare. I need sizes that are very large and windows or C# does not allow me to create bigger than the following for example:

public static int[] gaPoints = new int[20000000000000000000 + 1];

I get an error message saying that "integral size is too large".

I need to be able to declare sizes that are even much larger than the abovementioned size.

How can I circumvent this problem?

Do I have to use something other than arrays?

View 5 Replies View Related

C Sharp :: Split A File In Equal Size According To Its Bytes

Apr 10, 2013

how to split a file in equal size and when clicking on split button it split the files as well as encrypt split parts and the size information are automatically stored in groupbox and save all splitted files in folder.

View 1 Replies View Related

C Sharp :: Setting Custom Paper Size Of Crystal Report?

Sep 20, 2014

I want to print a report half sheet in A4 size..

I tried to change paper size in coding and in properties also but no use..so what is the correct code to change as custom size of report.

View 1 Replies View Related

C Sharp :: Get Specific Folder Size Information From NAS / NTFS Location After Mapping

Sep 26, 2012

How to measure a NAS (NTFS) free space/total space and used space? Few more details: I have the needed code to map the NAS location (serverNameshared_folderfoldersub_folder) into the local server where I am running my applciation but I can only get the needed statistics above for the whole NAS, I need to know the statistics for a specified folder on the NAS, how can I do that?

View 1 Replies View Related

C++ :: Reading Settings File

Aug 26, 2014

I'm trying to make a basic settings text file and I'm wondering why pos_y = strAxisData.find(",", pos_x, strAxisData.length()); returns std::string::npos when pos_y = strAxisData.find(","); works fine ? The settings text file format is:

string strAxisData;
while(finConfig)
{
getline(finConfig, strAxisData);
pos_x = strAxisData.find("=");
if(pos_x != std::string::npos)
}

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved