P
pran88
ok this what is done,
1 // wdPasteOLEObject data type.
2 private object objectPasteDataType =
Word.WdPasteDataType.wdPasteOLEObject;
3
4 // wdPasteRTF data type.
5 private object objectPasteDataType = Word.WdPasteDataType.wdPasteRTF;
6
7 // wdPasteHTML data type.
8 private object objectPasteDataType = Word.WdPasteDataType.wdPasteHTML;
9
10 // Variable to denote an active link.
11 private object objectTrue = true;
12
13 // Denotes the missing value.
14 private object objectMissing = System.Reflection.Missing.Value;
15
16 // The paste special method.
17 wordApplication.ActiveWindow.Selection.PasteSpecial(ref objectMissing,
18 ref objectTrue, ref objectPlacement, ref
objectMissing,
19 ref objectPasteDataType, ref objectMissing, ref
objectMissing);
As shown i curerntly use the wdPasteOLEObject as the data type in order to
produce an image of a selected range.
1. When a user selects a range ans clicks the copy button in the tool bar
the range is copied as a picture using the CopyAsPicture() method of the
Range object.
2. When the user places the cursor in another area and clicks the paste
button in the toolbar my custom paste method is invoked. inside the method i
have the code at line 17 which the PastesSpecial() method maintaining a link.
The problem is that the colors in a document i am trying to copy are not
appearing as it is but if i use the two types at line 5 or 8 within the
PateSpecial() method it works., but the result is not in an image format.
Is there any method that i can get the color as it is using the
wdPasteOLEObject.
Note - the document I copy date is generated using a template and not the
Normal.dot template. (I think this is also a cause but not sure.)
Any help is greatly appreciated.
Thank you in advance.
1 // wdPasteOLEObject data type.
2 private object objectPasteDataType =
Word.WdPasteDataType.wdPasteOLEObject;
3
4 // wdPasteRTF data type.
5 private object objectPasteDataType = Word.WdPasteDataType.wdPasteRTF;
6
7 // wdPasteHTML data type.
8 private object objectPasteDataType = Word.WdPasteDataType.wdPasteHTML;
9
10 // Variable to denote an active link.
11 private object objectTrue = true;
12
13 // Denotes the missing value.
14 private object objectMissing = System.Reflection.Missing.Value;
15
16 // The paste special method.
17 wordApplication.ActiveWindow.Selection.PasteSpecial(ref objectMissing,
18 ref objectTrue, ref objectPlacement, ref
objectMissing,
19 ref objectPasteDataType, ref objectMissing, ref
objectMissing);
As shown i curerntly use the wdPasteOLEObject as the data type in order to
produce an image of a selected range.
1. When a user selects a range ans clicks the copy button in the tool bar
the range is copied as a picture using the CopyAsPicture() method of the
Range object.
2. When the user places the cursor in another area and clicks the paste
button in the toolbar my custom paste method is invoked. inside the method i
have the code at line 17 which the PastesSpecial() method maintaining a link.
The problem is that the colors in a document i am trying to copy are not
appearing as it is but if i use the two types at line 5 or 8 within the
PateSpecial() method it works., but the result is not in an image format.
Is there any method that i can get the color as it is using the
wdPasteOLEObject.
Note - the document I copy date is generated using a template and not the
Normal.dot template. (I think this is also a cause but not sure.)
Any help is greatly appreciated.
Thank you in advance.