Hi,
In excel I select a range and copy it as Picture. I have tried to paste it in Word and it works, but as soon as I want to save it as Enhanced Metafile I always get a null reference.
here is my code:
private void CreateImageFile(string fileName) { if (Clipboard.ContainsData(System.Windows.DataFormats.EnhancedMetafile)) { Metafile metafile = Clipboard.GetData(System.Windows.DataFormats.EnhancedMetafile) as Metafile; try { metafile.Save(fileName); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
Hope you can help me.
Kind regards
Alex